create shared niri config, refactor generic feature modules

This commit is contained in:
greyweather committed 2026-09-06 01:59:38 +01:00
1 parent 257654332d
commit e1a08112a7
23 files changed
+351 -408

No files matched your search

+1 -109
View File
@@ -1,16 +1,7 @@
include "./noctalia.kdl"
input { input {
keyboard { keyboard {
xkb {
layout "gb"
model ""
rules ""
variant ""
}
repeat-delay 600 repeat-delay 600
repeat-rate 25 repeat-rate 25
track-layout "global"
} }
touchpad { touchpad {
tap tap
@@ -25,8 +16,6 @@ input {
accel-profile "flat" accel-profile "flat"
} }
} }
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
prefer-no-csd
overview { zoom 0.5; } overview { zoom 0.5; }
layout { layout {
gaps 12 gaps 12
@@ -39,49 +28,13 @@ layout {
focus-ring { focus-ring {
width 1.25 width 1.25
} }
border { off; }
shadow {
on
offset x=0 y=5
softness 15
spread 2
draw-behind-window false
color "#00000070"
}
center-focused-column "never" center-focused-column "never"
} }
cursor {
xcursor-theme "Bibata-Modern-Ice"
xcursor-size 22
}
hotkey-overlay { skip-at-startup; }
binds { binds {
Mod+B hotkey-overlay-title="Open web browser (Floorp)" { spawn "floorp"; } Mod+B hotkey-overlay-title="Open web browser (Floorp)" { spawn "floorp"; }
Mod+C hotkey-overlay-title="Open calculator (Qalculate)" { spawn "qalculate-qt"; } Mod+C hotkey-overlay-title="Open calculator (Qalculate)" { spawn "qalculate-qt"; }
Mod+D hotkey-overlay-title="Application launcher" { spawn "noctalia" "msg" "panel-toggle" "launcher"; }
Mod+E hotkey-overlay-title="Open file manager (Nautilus)" { spawn "nautilus" "-w"; } Mod+E hotkey-overlay-title="Open file manager (Nautilus)" { spawn "nautilus" "-w"; }
Mod+Return hotkey-overlay-title="Open terminal (Kitty)" { spawn "kitty"; }
Mod+O hotkey-overlay-title="Open Obsidian" { spawn "obsidian"; }
Mod+Z hotkey-overlay-title="Apply NixOS config" { spawn "kitty" "zsh" "-i" "-c" "apply-config"; }
Mod+K { show-hotkey-overlay; }
Mod+Space { toggle-overview; }
Mod+Q { close-window; }
Mod+F { maximize-window-to-edges; }
Mod+Shift+F { fullscreen-window; }
Mod+Shift+E { quit; }
Mod+L hotkey-overlay-title="Lock session" { spawn "noctalia" "msg" "session" "lock"; }
Mod+Shift+D hotkey-overlay-title="Edit desktop widgets" { spawn "noctalia" "msg" "desktop-widgets-edit"; }
Mod+Shift+B hotkey-overlay-title="Open bar settings" { spawn "noctalia" "msg" "settings-open" "bar"; }
Mod+Shift+S hotkey-overlay-title="Open settings" { spawn "noctalia" "msg" "settings-open"; }
Mod+Period hotkey-overlay-title="Open control center" { spawn "noctalia" "msg" "panel-toggle" "control-center"; }
Mod+Shift+P hotkey-overlay-title="Open power menu" { spawn "noctalia" "msg" "panel-toggle" "session"; }
Mod+V hotkey-overlay-title="Show clipboard helper" { spawn "noctalia" "msg" "panel-toggle" "clipboard"; }
Mod+P hotkey-overlay-title="Show power info" { spawn "noctalia" "msg" "panel-toggle" "control-center" "power"; }
Ctrl+Shift+Escape { spawn "noctalia" "msg" "panel-toggle" "control-center" "system"; }
Mod+Comma { spawn "noctalia" "msg" "panel-toggle" "dunarand/bookmarks:panel" "search"; } Mod+Comma { spawn "noctalia" "msg" "panel-toggle" "dunarand/bookmarks:panel" "search"; }
Mod+TouchpadScrollUp cooldown-ms=250 { focus-workspace-up; } Mod+TouchpadScrollUp cooldown-ms=250 { focus-workspace-up; }
@@ -89,45 +42,13 @@ binds {
Mod+TouchpadScrollLeft cooldown-ms=150 { focus-column-left; } Mod+TouchpadScrollLeft cooldown-ms=150 { focus-column-left; }
Mod+TouchpadScrollRight cooldown-ms=150 { focus-column-right; } Mod+TouchpadScrollRight cooldown-ms=150 { focus-column-right; }
Mod+Up { focus-workspace-up; }
Mod+Down { focus-workspace-down; }
Mod+Left { focus-column-left; }
Mod+Right { focus-column-right; }
Mod+Shift+Up { move-window-to-workspace-up; }
Mod+Shift+Down { move-window-to-workspace-down; }
Mod+Shift+Left { move-column-left; }
Mod+Shift+Right { move-column-right; }
Mod+equal { set-column-width "+2%"; } Mod+equal { set-column-width "+2%"; }
Mod+minus { set-column-width "-2%"; } Mod+minus { set-column-width "-2%"; }
XF86AudioLowerVolume { spawn "noctalia" "msg" "volume-down" "5"; }
XF86AudioRaiseVolume { spawn "noctalia" "msg" "volume-up" "5"; }
XF86AudioMute { spawn "noctalia" "msg" "volume-mute"; }
XF86AudioMicMute { spawn "noctalia" "msg" "mic-mute"; }
XF86MonBrightnessDown { spawn "noctalia" "msg" "brightness-down" "5"; }
XF86MonBrightnessUp { spawn "noctalia" "msg" "brightness-up" "5"; }
XF86WLAN { spawn-sh "rfkill toggle 0 || rfkill toggle 1"; }
XF86NotificationCenter { spawn "noctalia" "msg" "panel-toggle" "control-center" "notifications"; }
XF86Display { toggle-overview; }
XF86Favorites { spawn "niri-toggle-dwt"; } XF86Favorites { spawn "niri-toggle-dwt"; }
Print { screenshot; }
Shift+Print { screenshot-window; }
Mod+Slash { spawn "niri-scratch-workspace-toggle"; }
Mod+Shift+Slash { move-window-to-workspace "x" focus=false; }
} }
workspace "x" {
hidden true
}
spawn-at-startup "noctalia"
spawn-at-startup "niri-listen-for-scratch-workspace-change"
spawn-at-startup "niri-clear-state"
window-rule { window-rule {
draw-border-with-background false
geometry-corner-radius 2 geometry-corner-radius 2
clip-to-geometry true
} }
window-rule { window-rule {
match app-id="^floorp$" match app-id="^floorp$"
@@ -140,35 +61,6 @@ window-rule {
match app-id="^kitty$" match app-id="^kitty$"
default-column-width { proportion 0.58; } default-column-width { proportion 0.58; }
} }
gestures { hot-corners { off; }; }
switch-events { switch-events {
lid-close { spawn "bash" "-c" "noctalia msg session lock && systemctl hibernate"; } lid-close { spawn "systemctl hibernate"; }
}
animations {
on
slowdown 1.0
workspace-switch {
spring damping-ratio=0.95 stiffness=600 epsilon=0.0001
}
window-open {
duration-ms 125
curve "ease-out-expo"
}
window-close {
duration-ms 125
curve "ease-out-quad"
}
horizontal-view-movement {
spring damping-ratio=0.95 stiffness=600 epsilon=0.0001
}
window-movement {
spring damping-ratio=0.9 stiffness=750 epsilon=0.0001
}
window-resize {
spring damping-ratio=0.8 stiffness=650 epsilon=0.0001
}
}
layer-rule {
match namespace="^noctalia-backdrop"
place-within-backdrop true
} }
+147
View File
@@ -0,0 +1,147 @@
include "./noctalia.kdl"
input {
keyboard {
xkb {
layout "gb"
model ""
rules ""
variant ""
}
repeat-delay 600
repeat-rate 25
track-layout "global"
numlock
}
focus-follows-mouse max-scroll-amount="0%"
}
prefer-no-csd
hotkey-overlay { skip-at-startup; }
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
cursor {
xcursor-theme "Bibata-Modern-Ice"
xcursor-size 22
}
layout {
border { off; }
shadow {
on
offset x=10 y=10
softness 25
spread 5
draw-behind-window false
color "#00000060"
}
}
binds {
Mod+D hotkey-overlay-title="Application launcher" { spawn "noctalia" "msg" "panel-toggle" "launcher"; }
Mod+Return hotkey-overlay-title="Open terminal (Kitty)" { spawn "kitty"; }
Mod+O hotkey-overlay-title="Open Obsidian" { spawn "obsidian"; }
Mod+Z hotkey-overlay-title="Apply NixOS / Home Manager config" { spawn "kitty" "zsh" "-i" "-c" "apply-config"; }
Mod+K { show-hotkey-overlay; }
Mod+Space { toggle-overview; }
Mod+Q { close-window; }
Mod+F { maximize-window-to-edges; }
Mod+Shift+F { fullscreen-window; }
Mod+Shift+E { quit; }
Mod+L hotkey-overlay-title="Lock session" { spawn "noctalia" "msg" "session" "lock"; }
Mod+Shift+D hotkey-overlay-title="Edit desktop widgets" { spawn "noctalia" "msg" "desktop-widgets-edit"; }
Mod+Shift+B hotkey-overlay-title="Open bar settings" { spawn "noctalia" "msg" "settings-open" "bar"; }
Mod+Shift+S hotkey-overlay-title="Open settings" { spawn "noctalia" "msg" "settings-open"; }
Mod+Period hotkey-overlay-title="Open control center" { spawn "noctalia" "msg" "panel-toggle" "control-center"; }
Mod+Shift+P hotkey-overlay-title="Open power menu" { spawn "noctalia" "msg" "panel-toggle" "session"; }
Mod+V hotkey-overlay-title="Show clipboard helper" { spawn "noctalia" "msg" "panel-toggle" "clipboard"; }
Mod+P hotkey-overlay-title="Show power info" { spawn "noctalia" "msg" "panel-toggle" "control-center" "power"; }
Ctrl+Shift+Escape { spawn "noctalia" "msg" "panel-toggle" "control-center" "system"; }
Mod+Up { focus-workspace-up; }
Mod+Down { focus-workspace-down; }
Mod+Left { focus-column-left; }
Mod+Right { focus-column-right; }
Mod+X { toggle-window-floating; }
Mod+Shift+Up { move-window-to-workspace-up; }
Mod+Shift+Down { move-window-to-workspace-down; }
Mod+Shift+Left { move-column-left; }
Mod+Shift+Right { move-column-right; }
XF86AudioLowerVolume { spawn "noctalia" "msg" "volume-down" "5"; }
XF86AudioRaiseVolume { spawn "noctalia" "msg" "volume-up" "5"; }
XF86AudioMute { spawn "noctalia" "msg" "volume-mute"; }
XF86AudioMicMute { spawn "noctalia" "msg" "mic-mute"; }
XF86MonBrightnessDown { spawn "noctalia" "msg" "brightness-down" "5"; }
XF86MonBrightnessUp { spawn "noctalia" "msg" "brightness-up" "5"; }
XF86WLAN { spawn-sh "rfkill toggle 0 || rfkill toggle 1"; }
XF86NotificationCenter { spawn "noctalia" "msg" "panel-toggle" "control-center" "notifications"; }
XF86Display { toggle-overview; }
Print { screenshot; }
Shift+Print { screenshot-window; }
Mod+Slash { spawn "niri-scratch-workspace-toggle"; }
Mod+Shift+Slash { move-window-to-workspace "x" focus=false; }
}
workspace "x" {
hidden true
layout {
focus-ring {
width 3
active-color "#a33d3d"
}
}
}
window-rule {
draw-border-with-background false
clip-to-geometry true
}
window-rule { // Steam windows float (excluding main window)
match app-id="^steam$"
exclude title="^Steam$"
exclude title=r#"^notificationtoasts_\d+_desktop$"#
default-window-height { proportion 0.5; }
open-floating true
}
window-rule { // Steam notifications are not focused and appear in bottom-right corner
match app-id="steam" title=r#"^notificationtoasts_\d+_desktop$"#
default-floating-position x=10 y=10 relative-to="bottom-right"
open-focused false
}
spawn-at-startup "noctalia"
spawn-at-startup "niri-listen-for-scratch-workspace-change"
spawn-at-startup "niri-clear-state"
gestures { hot-corners { off; }; }
layer-rule {
match namespace="^noctalia-backdrop"
place-within-backdrop true
}
animations {
on
slowdown 1
workspace-switch {
spring damping-ratio=0.9 stiffness=750 epsilon=0.0001
}
window-open {
duration-ms 100
curve "ease-out-expo"
}
window-close {
duration-ms 125
curve "ease-out-quad"
}
horizontal-view-movement {
spring damping-ratio=0.85 stiffness=850 epsilon=0.0001
}
window-movement {
spring damping-ratio=0.9 stiffness=750 epsilon=0.0001
}
window-resize {
spring damping-ratio=0.8 stiffness=650 epsilon=0.0001
}
}
File renamed without changes.
+2 -1
View File
@@ -10,6 +10,7 @@ visiblePlugin=deesser#0
[StreamOutputs] [StreamOutputs]
outputDevice=alsa_output.usb-Focusrite_Scarlett_2i2_USB_Y8PK1YT167E441-00.HiFi__Line__sink outputDevice=alsa_output.usb-Focusrite_Scarlett_2i2_USB_Y8PK1YT167E441-00.HiFi__Line__sink
plugins=equalizer#0 plugins=equalizer#0
visiblePage=pluginsPage
visiblePlugin=equalizer#0 visiblePlugin=equalizer#0
[Style] [Style]
@@ -17,7 +18,7 @@ forceBreezeTheme=false
[Window] [Window]
autostartOnLogin=true autostartOnLogin=true
height=1408 height=1364
showTrayIcon=false showTrayIcon=false
visiblePage=inputPage visiblePage=inputPage
width=1912 width=1912
@@ -4,7 +4,7 @@
"authenticated": false, "authenticated": false,
"settingsSync": false, "settingsSync": false,
"url": "https://cloud.equicord.org/", "url": "https://cloud.equicord.org/",
"settingsSyncVersion": 1788360340476 "settingsSyncVersion": 1788650476307
}, },
"enableOnlineThemes": true, "enableOnlineThemes": true,
"enabledThemeLinks": [ "enabledThemeLinks": [
+4 -105
View File
@@ -1,22 +1,14 @@
include "./noctalia.kdl" include "./shared.kdl"
input { input {
keyboard { keyboard {
xkb {
layout "gb"
model ""
rules ""
variant ""
}
repeat-delay 600 repeat-delay 600
repeat-rate 25 repeat-rate 25
track-layout "global"
numlock
} }
mouse { mouse {
accel-speed 0.25 accel-speed 0.25
accel-profile "flat" accel-profile "flat"
} }
focus-follows-mouse max-scroll-amount="0%"
} }
output "DP-2" { output "DP-2" {
@@ -34,75 +26,33 @@ output "HDMI-A-1" {
transform "270" transform "270"
position x=-1080 y=-250 position x=-1080 y=-250
} }
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
prefer-no-csd
overview { zoom 0.67; } overview { zoom 0.67; }
layout { layout {
gaps 16 gaps 16
struts { struts {
left 24 left 24
right 24 right 24
top -8 top -12
bottom -4 bottom -4
} }
focus-ring { focus-ring {
width 1.5 width 1.5
} }
border { off; }
shadow {
on
offset x=0.000000 y=5.000000
softness 30.000000
spread 5.000000
draw-behind-window false
color "#00000070"
}
default-column-width default-column-width
center-focused-column "never" center-focused-column "never"
always-center-single-column always-center-single-column
empty-workspace-above-first empty-workspace-above-first
} }
cursor {
xcursor-theme "Bibata-Modern-Ice"
xcursor-size 22
}
hotkey-overlay { skip-at-startup; }
binds { binds {
Mod+B { spawn "zen-browser"; } Mod+B { spawn "zen-browser"; }
Mod+C { spawn "kcalc"; } Mod+C { spawn "kcalc"; }
Mod+D { spawn "noctalia" "msg" "panel-toggle" "launcher"; }
Mod+E { spawn "dolphin"; } Mod+E { spawn "dolphin"; }
Mod+Return { spawn "kitty"; }
Mod+O { spawn "obsidian"; }
ISO_Level3_Shift+Comma { spawn "equibop" "--toggle-mic"; } ISO_Level3_Shift+Comma { spawn "equibop" "--toggle-mic"; }
ISO_Level3_Shift+Period { spawn "equibop" "--toggle-deafen"; } ISO_Level3_Shift+Period { spawn "equibop" "--toggle-deafen"; }
Mod+Space { toggle-overview; }
Mod+Q { close-window; }
Mod+F { maximize-window-to-edges; }
Mod+Shift+F { fullscreen-window; }
Mod+Shift+E { quit; }
Mod+L { spawn "noctalia" "msg" "session" "lock"; }
Mod+Shift+D { spawn "noctalia" "msg" "desktop-widgets-edit"; }
Mod+Shift+B { spawn "noctalia" "msg" "settings-open" "bar"; }
Mod+Shift+S { spawn "noctalia" "msg" "settings-open"; }
Mod+Period { spawn "noctalia" "msg" "panel-toggle" "control-center"; }
Mod+W { spawn "noctalia" "msg" "panel-toggle" "wallpaper"; }
Mod+Shift+P { spawn "noctalia" "msg" "panel-toggle" "session"; }
Mod+V { spawn "noctalia" "msg" "panel-toggle" "clipboard"; }
Mod+P { spawn "noctalia" "msg" "panel-toggle" "control-center" "power"; }
Ctrl+Shift+Escape { spawn "noctalia" "msg" "panel-toggle" "control-center" "system"; }
Mod+A { spawn "toggle-easyeffects"; } Mod+A { spawn "toggle-easyeffects"; }
Mod+Up { focus-workspace-up; }
Mod+Down { focus-workspace-down; }
Mod+Left { focus-column-left; }
Mod+Right { focus-column-right; }
Mod+WheelScrollUp { focus-column-left; } Mod+WheelScrollUp { focus-column-left; }
Mod+WheelScrollDown { focus-column-right; } Mod+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-workspace-up; } Mod+Shift+WheelScrollUp { focus-workspace-up; }
@@ -111,11 +61,6 @@ binds {
Mod+equal { set-column-width "+5%"; } Mod+equal { set-column-width "+5%"; }
Mod+minus { set-column-width "-5%"; } Mod+minus { set-column-width "-5%"; }
Mod+Shift+Up { move-window-to-workspace-up; }
Mod+Shift+Down { move-window-to-workspace-down; }
Mod+Shift+Left { move-column-left; }
Mod+Shift+Right { move-column-right; }
Mod+Control+Left { focus-monitor-left; } Mod+Control+Left { focus-monitor-left; }
Mod+Control+Right { focus-monitor-right; } Mod+Control+Right { focus-monitor-right; }
@@ -125,59 +70,23 @@ binds {
Mod+Shift+Control+Left { move-window-to-monitor-left; } Mod+Shift+Control+Left { move-window-to-monitor-left; }
Mod+Shift+Control+Right { move-window-to-monitor-right; } Mod+Shift+Control+Right { move-window-to-monitor-right; }
XF86AudioLowerVolume { spawn "noctalia" "msg" "volume-down" "5"; }
XF86AudioRaiseVolume { spawn "noctalia" "msg" "volume-up" "5"; }
XF86AudioMute { spawn "noctalia" "msg" "volume-mute"; }
Print { screenshot; }
Mod+XF86AudioRaiseVolume cooldown-ms=250 { spawn "increase-brightness" "/dev/i2c-10"; } Mod+XF86AudioRaiseVolume cooldown-ms=250 { spawn "increase-brightness" "/dev/i2c-10"; }
Mod+XF86AudioLowerVolume cooldown-ms=250 { spawn "decrease-brightness" "/dev/i2c-10"; } Mod+XF86AudioLowerVolume cooldown-ms=250 { spawn "decrease-brightness" "/dev/i2c-10"; }
Mod+Shift+XF86AudioRaiseVolume cooldown-ms=250 { spawn "increase-brightness" "/dev/i2c-6"; } Mod+Shift+XF86AudioRaiseVolume cooldown-ms=250 { spawn "increase-brightness" "/dev/i2c-6"; }
Mod+Shift+XF86AudioLowerVolume cooldown-ms=250 { spawn "decrease-brightness" "/dev/i2c-6"; } Mod+Shift+XF86AudioLowerVolume cooldown-ms=250 { spawn "decrease-brightness" "/dev/i2c-6"; }
Mod+Slash { spawn "niri-scratch-workspace-toggle"; }
Mod+Shift+Slash { move-window-to-workspace "x" focus=false; }
Mod+X { toggle-window-floating; }
Mod+Z { spawn "kitty" "zsh" "-i" "-c" "apply-config"; }
} }
workspace "x" {
hidden true
layout {
focus-ring {
width 3
active-color "#a33d3d"
}
}
}
spawn-at-startup "noctalia"
spawn-at-startup "niri-listen-for-scratch-workspace-change"
window-rule { window-rule {
draw-border-with-background false
geometry-corner-radius 4 geometry-corner-radius 4
clip-to-geometry true
} }
window-rule { // Maximized on vertical monitor window-rule { // Maximized on vertical monitor
match at-startup=true app-id="^equibop$" match at-startup=true app-id="^equibop$"
open-maximized-to-edges true open-maximized-to-edges true
open-on-output "HDMI-A-1" open-on-output "HDMI-A-1"
} }
window-rule { // Steam windows float (excluding main window)
match app-id="^steam$"
exclude title="^Steam$"
exclude title=r#"^notificationtoasts_\d+_desktop$"#
default-window-height { proportion 0.5; }
open-floating true
open-focused true
}
window-rule {
match app-id="steam" title=r#"^notificationtoasts_\d+_desktop$"#
default-floating-position x=10 y=10 relative-to="bottom-right"
open-focused false
}
window-rule { // Maximized on main monitor window-rule { // Maximized on main monitor
match at-startup=true app-id="^steam$" title="^Steam$" match at-startup=true app-id="^steam$" title="^Steam$"
open-maximized-to-edges true open-maximized-to-edges true
open-on-output "HDMI-A-1" open-on-output "DP-2"
} }
window-rule { // Fullscreen on main monitor window-rule { // Fullscreen on main monitor
match app-id="^steam_app_\\d+$" match app-id="^steam_app_\\d+$"
@@ -197,13 +106,3 @@ window-rule {
match app-id="^org\\.prismlauncher\\.PrismLauncher$" match app-id="^org\\.prismlauncher\\.PrismLauncher$"
default-window-height { fixed 750; } default-window-height { fixed 750; }
} }
gestures { hot-corners { off; }; }
animations {
on
slowdown 1.25
}
layer-rule {
match namespace="^noctalia-backdrop"
place-within-backdrop true
}
include "noctalia.kdl"
Generated
+4 -4
View File
@@ -187,11 +187,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1788319420, "lastModified": 1788653102,
"narHash": "sha256-y4hOpWzUp8ZWzoIsQINIxFifoWOV1tQPVqHVtX24luc=", "narHash": "sha256-UHCmPae6q8t15dMGZ6d+Imkpu+tQFxxOWD8+n/5AWT4=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "1cfc810e699659bab9a9c8f071a5770fc3d8b886", "rev": "18982a624707263369598f49f80f55c65357610b",
"revCount": 52, "revCount": 54,
"type": "git", "type": "git",
"url": "https://git.greyweather.dev/greyweather/nix-helper-flake" "url": "https://git.greyweather.dev/greyweather/nix-helper-flake"
}, },
-2
View File
@@ -16,8 +16,6 @@
flake.homeModules.graphics = { pkgs, config, lib, inputs, ... }: { flake.homeModules.graphics = { pkgs, config, lib, inputs, ... }: {
config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) { config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) {
home = { home = {
packages = lib.mkIf (config.info.isStandalone) [ inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default ];
activation = { activation = {
linkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { linkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.home.homeDirectory}/.local/state/noctalia/settings.toml"; target = "${config.home.homeDirectory}/.local/state/noctalia/settings.toml";
+47 -69
View File
@@ -1,88 +1,66 @@
{ inputs, self, ... }: { { inputs, self, ... }: {
imports = [ ./niri.nix ];
flake.nixosModules.graphics = { config, pkgs, lib, ... }: { flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
# override niri source to use https://github.com/barrulus/biri
config = lib.mkIf (builtins.elem "biri" config.components.windowManagers) { config = lib.mkIf (builtins.elem "biri" config.components.windowManagers) {
environment.systemPackages = with pkgs; [ programs.niri.package = self.packages.${pkgs.stdenv.hostPlatform.system}.biri;
xdg-desktop-portal-gnome
wl-clipboard
libsecret
cage
wev
qalculate-qt
];
features.applications.gui.nautilus.enable = true;
services.upower.enable = true;
services.udisks2.enable = true;
programs.niri = {
enable = true;
useNautilus = true;
# override niri source to use https://github.com/barrulus/biri
package = self.packages.${pkgs.stdenv.hostPlatform.system}.biri;
};
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) { home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
components.windowManagers = [ "niri" ]; components.windowManagers = [ "biri" ];
}; };
}; };
}; };
flake.homeModules.graphics = { config, pkgs, lib, inputs, ... }: { flake.homeModules.graphics = { config, pkgs, lib, inputs, ... }: {
home = lib.mkIf ((config.components.windowManagers == "biri")||(builtins.elem "biri" config.components.windowManagers)) { config = lib.mkIf (builtins.elem "biri" config.components.windowManagers) {
activation.linkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { features.applications.shellScripts = {
target = "${config.xdg.configHome}/niri/config.kdl"; niri-scratch-workspace-toggle = ''
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/niri.kdl"; if niri msg --json workspaces-with-hidden | jq -e '.[] | select(.name=="x") | .is_hidden' >/dev/null; then
}); niri msg action unhide-workspace --focus=false "x"
}; OUTPUT=$(niri msg --json focused-output | jq '.name' | sed 's/"//g')
niri msg action move-workspace-to-monitor --reference "x" "$OUTPUT"
features.applications.shellScripts = { niri msg action focus-workspace "x"
niri-scratch-workspace-toggle = '' else
if niri msg --json workspaces-with-hidden | jq -e '.[] | select(.name=="x") | .is_hidden' >/dev/null; then
niri msg action unhide-workspace --focus=false "x"
OUTPUT=$(niri msg --json focused-output | jq '.name' | sed 's/"//g')
niri msg action move-workspace-to-monitor --reference "x" "$OUTPUT"
niri msg action focus-workspace "x"
else
niri msg action hide-workspace "x"
fi
'';
niri-listen-for-scratch-workspace-change = ''
niri msg --json event-stream | while read -r event; do
if echo $event | jq -e '.WorkspaceActivated.focused' >/dev/null; then
if niri msg --json workspaces | jq -e '.[] | select(.name=="x") | .is_active==false' >/dev/null; then
niri msg action hide-workspace "x"
fi
elif echo $event | jq -e '.WorkspacesChanged.workspaces.[] | select(.name=="x") | .is_active==false' >/dev/null; then
niri msg action hide-workspace "x" niri msg action hide-workspace "x"
fi fi
done '';
'';
niri-toggle-dwt = '' niri-listen-for-scratch-workspace-change = ''
niri msg action toggle-dwt niri msg --json event-stream | while read -r event; do
cd ${config.xdg.stateHome} if echo $event | jq -e '.WorkspaceActivated.focused' >/dev/null; then
if [ -f ./niri.json ]; then if niri msg --json workspaces | jq -e '.[] | select(.name=="x") | .is_active==false' >/dev/null; then
if jq -e '.dwt' niri.json >/dev/null; then niri msg action hide-workspace "x"
NEW_JSON=$(jq '.dwt = false' niri.json) fi
echo "$NEW_JSON" > niri.json elif echo $event | jq -e '.WorkspacesChanged.workspaces.[] | select(.name=="x") | .is_active==false' >/dev/null; then
niri msg action hide-workspace "x"
fi
done
'';
niri-toggle-dwt = ''
niri msg action toggle-dwt
cd ${config.xdg.stateHome}
if [ -f ./niri.json ]; then
if jq -e '.dwt' niri.json >/dev/null; then
NEW_JSON=$(jq '.dwt = false' niri.json)
echo "$NEW_JSON" > niri.json
else
NEW_JSON=$(jq '.dwt = true' niri.json)
echo "$NEW_JSON" > niri.json
fi
else else
NEW_JSON=$(jq '.dwt = true' niri.json) echo '{"dwt": false}' | jq '.' > niri.json
echo "$NEW_JSON" > niri.json
fi fi
else PRETTY_STATE=$(if jq -e '.dwt' niri.json >/dev/null; then echo "on"; else echo "off"; fi)
echo '{"dwt": false}' | jq '.' > niri.json notify-send -e -a "niri-toggle-dwt script" "Toggled DWT $PRETTY_STATE"
fi '';
NEW_STATE=$(jq '.dwt' niri.json)
noctalia msg notification-show "Touchpad DWT toggled $NEW_STATE"
'';
niri-clear-state = '' niri-clear-state = ''
cd ${config.xdg.stateHome} cd ${config.xdg.stateHome}
rm niri.json rm niri.json
''; '';
};
}; };
}; };
} }
+13 -22
View File
@@ -1,6 +1,6 @@
{ inputs, self, ... }: { { inputs, self, ... }: {
flake.nixosModules.graphics = { config, pkgs, lib, ... }: { flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
config = lib.mkIf (builtins.elem "niri" config.components.windowManagers) { config = lib.mkIf (builtins.elem "niri" config.components.windowManagers || builtins.elem "biri" config.components.windowManagers) {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
xdg-desktop-portal-gnome xdg-desktop-portal-gnome
wl-clipboard wl-clipboard
@@ -10,8 +10,6 @@
qalculate-qt qalculate-qt
]; ];
features.applications.gui.nautilus.enable = true;
services.upower.enable = true; services.upower.enable = true;
services.udisks2.enable = true; services.udisks2.enable = true;
@@ -19,20 +17,6 @@
programs.niri = { programs.niri = {
enable = true; enable = true;
useNautilus = true; useNautilus = true;
# override niri source to use https://github.com/niri-wm/niri/pull/3642
package = (pkgs.niri.overrideAttrs (finalAttrs: prevAttrs: {
cargoHash = "sha256-HypBB3PL4nVFMNH2+jEK0+dG9dJ920nHi8GwRoeH/v4=";
src = pkgs.fetchFromGitHub {
owner = "niri-wm";
repo = "niri";
rev = "cb41d54703eef73883bb2be58e19bcf3715d777c";
sha256 = "sha256-cLzTeMcCdQJ+kHGcOposjeheFyEG/tGOA1jFAORMHjI=";
};
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname src version;
hash = finalAttrs.cargoHash;
};
}));
}; };
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) { home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
@@ -42,11 +26,18 @@
}; };
flake.homeModules.graphics = { config, pkgs, lib, inputs, ... }: { flake.homeModules.graphics = { config, pkgs, lib, inputs, ... }: {
home = lib.mkIf ((config.components.windowManagers == "niri")||(builtins.elem "niri" config.components.windowManagers)) { home = lib.mkIf (builtins.elem "niri" config.components.windowManagers || builtins.elem "biri" config.components.windowManagers) {
activation.linkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { activation = {
target = "${config.xdg.configHome}/niri/config.kdl"; linkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/niri.kdl"; target = "${config.xdg.configHome}/niri/config.kdl";
}); source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/niri.kdl";
});
linkSharedConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.xdg.configHome}/niri/shared.kdl";
source = "${config.info.rootPath}/dotfiles/shared/niri-shared.kdl";
});
};
}; };
}; };
} }
+1 -6
View File
@@ -118,12 +118,7 @@ in {
options.features.documentation = let options.features.documentation = let
defaultPort = "8080"; defaultPort = "8080";
in { in {
enable = lib.mkOption { enable = lib.mkEnableOption "documentation for the flake, generated with [Material for mkDocs](https://squidfunk.github.io/mkdocs-material/) and hosted by (containerised) nginx at localhost:${defaultPort} by default.";
type = lib.types.bool;
description = "Whether to enable documentation for the flake, generated with [Material for mkDocs](https://squidfunk.github.io/mkdocs-material/) and hosted by (containerised) nginx at localhost:${defaultPort} by default.";
default = true;
};
port = lib.mkOption { port = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "This option sets the port used by the nginx server hosting the local documentation site."; description = "This option sets the port used by the nginx server hosting the local documentation site.";
@@ -1,9 +1,5 @@
{ inputs, self, lib, ... }: let { inputs, self, lib, ... }: let
featureOptionName = "features.applications.cli.color-converter.enable"; optionName = "features.applications.cli.color-converter.enable";
moduleArgs = config: {
inherit config;
optionName = featureOptionName;
};
color-converter-package = { lib, pkgs }: pkgs.python3Packages.buildPythonApplication rec { color-converter-package = { lib, pkgs }: pkgs.python3Packages.buildPythonApplication rec {
pname = "color-converter"; pname = "color-converter";
@@ -35,16 +31,16 @@
}; };
}; };
in { in {
imports = [ (inputs.helpers.mkStandardFeature.flakeModule "global" featureOptionName (lib.mkEnableOption "`color-converter`")) ]; imports = [ (inputs.helpers.mkStandardFeature.flakeModule "global" optionName "`color-converter`") ];
flake.nixosModules.global = { pkgs, lib, config, ... }: { flake.nixosModules.global = { pkgs, lib, config, ... }: {
imports = [ (inputs.helpers.mkStandardFeature.nixosModule (moduleArgs config) { imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
environment.systemPackages = [ (pkgs.callPackage color-converter-package {}) ]; environment.systemPackages = [ (pkgs.callPackage color-converter-package {}) ];
}) ]; }) ];
}; };
flake.homeModules.global = { pkgs, config, lib, ... }: { flake.homeModules.global = { pkgs, config, lib, ... }: {
imports = [ (inputs.helpers.mkStandardFeature.homeModule (moduleArgs config) { imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
home.packages = [ (pkgs.callPackage color-converter-package {}) ]; home.packages = [ (pkgs.callPackage color-converter-package {}) ];
}) ]; }) ];
}; };
@@ -1,20 +1,18 @@
{ inputs, self, ... }: { { inputs, self, ... }: let
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: { optionName = "features.applications.cli.fastfetch.enable";
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "`fastfetch`"; in {
})) ]; imports = [ (inputs.helpers.mkStandardFeature.flakeModule "global" optionName "`fastfetch`") ];
flake.nixosModules.global = { pkgs, lib, config, ... }: { flake.nixosModules.global = { pkgs, lib, config, ... }: {
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) { imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
home-manager.users.${config.info.userName}.features.applications.cli.fastfetch.enable = lib.mkDefault true;
} {
environment.systemPackages = [ pkgs.fastfetch ]; environment.systemPackages = [ pkgs.fastfetch ];
}); }) ];
}; };
flake.homeModules.global = { pkgs, lib, config, ... }: { flake.homeModules.global = { pkgs, lib, config, ... }: {
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) ({ imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
programs.zsh.initContent = lib.mkOrder 1500 "fastfetch"; programs.zsh.initContent = lib.mkOrder 1500 "fastfetch";
programs.fastfetch.enable = true; programs.fastfetch.enable = true;
}); }) ];
}; };
} }
+1 -1
View File
@@ -14,7 +14,7 @@
flake.homeModules.graphics = { pkgs, lib, config, ... }: { flake.homeModules.graphics = { pkgs, lib, config, ... }: {
config = lib.mkIf (config.features.applications.gui.floorp.enable) ( config = lib.mkIf (config.features.applications.gui.floorp.enable) (
let let
firefox-addons = with pkgs; inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; firefox-addons = inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system};
in { in {
programs.floorp = { programs.floorp = {
enable = true; enable = true;
+30 -28
View File
@@ -63,39 +63,41 @@
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
}; };
}; };
optionName = "features.applications.gui.fluxer.enable";
optionNameCanary = "features.applications.gui.fluxer-canary.enable";
in { in {
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: { imports = [
options.features.applications.gui = { (inputs.helpers.mkStandardFeature.flakeModule "graphics" optionName "Fluxer")
fluxer.enable = lib.mkEnableOption "Fluxer"; (inputs.helpers.mkStandardFeature.flakeModule "graphics" optionNameCanary "Fluxer Canary")
fluxer-canary.enable = lib.mkEnableOption "Fluxer Canary"; ];
};
})) ];
flake.nixosModules.graphics = { pkgs, config, lib, ... }: { flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) { imports = [
home-manager.users.${config.info.userName}.features.applications.gui.fluxer.enable = lib.mkDefault true; (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
} { environment.systemPackages = [
environment.systemPackages = [ (pkgs.callPackage (fluxer-package) {})
(pkgs.callPackage (fluxer-package) {}) ];
]; })
}) // lib.mkIf (config.features.applications.gui.fluxer-canary.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) { (inputs.helpers.mkStandardFeature.nixosModule { inherit config; optionName = optionNameCanary; } {
home-manager.users.${config.info.userName}.features.applications.gui.fluxer-canary.enable = lib.mkDefault true; environment.systemPackages = [
} { (pkgs.callPackage (fluxer-canary-package) {})
environment.systemPackages = [ ];
(pkgs.callPackage (fluxer-canary-package) {}) })
]; ];
});
}; };
flake.homeModules.graphics = { pkgs, config, lib, ... }: { flake.homeModules.graphics = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.fluxer.enable) { imports = [
home.packages = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
(pkgs.callPackage (fluxer-package) {}) home.packages = [
]; (pkgs.callPackage (fluxer-package) {})
} // lib.mkIf (config.features.applications.gui.fluxer-canary.enable) { ];
home.packages = [ })
(pkgs.callPackage (fluxer-canary-package) {}) (inputs.helpers.mkStandardFeature.homeModule { inherit config; optionName = optionNameCanary; } {
]; home.packages = [
}; (pkgs.callPackage (fluxer-canary-package) {})
];
})
];
}; };
} }
+8 -12
View File
@@ -1,25 +1,21 @@
{ inputs, self, ... }: { { inputs, self, ... }: let
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: { optionName = "features.applications.gui.kitty.enable";
options.features.applications.gui.kitty.enable = lib.mkEnableOption "Kitty Terminal"; in {
}))]; imports = [ (inputs.helpers.mkStandardFeature.flakeModule "graphics" optionName "Kitty Terminal") ];
flake.nixosModules.graphics = { pkgs, config, lib, ... }: { flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
config = let imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
in lib.mkIf (config.features.applications.gui.kitty.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.${config.info.userName}.features.applications.gui.kitty.enable = lib.mkDefault true;
} {
environment.systemPackages = [ pkgs.kitty ]; environment.systemPackages = [ pkgs.kitty ];
}); }) ];
}; };
flake.homeModules.graphics = { pkgs, config, lib, ... }: { flake.homeModules.graphics = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.kitty.enable) { imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
programs.kitty = { programs.kitty = {
enable = true; enable = true;
shellIntegration.enableBashIntegration = true; shellIntegration.enableBashIntegration = true;
enableGitIntegration = true; enableGitIntegration = true;
}; };
}; }) ];
}; };
} }
+8 -10
View File
@@ -1,21 +1,19 @@
{ inputs, self, ... }: { { inputs, self, ... }: let
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: { optionName = "features.applications.gui.remmina.enable";
options.features.applications.gui.remmina.enable = lib.mkEnableOption "Remmina"; in {
})) ]; imports = [ (inputs.helpers.mkStandardFeature.flakeModule "graphics" optionName "Remmina") ];
flake.nixosModules.graphics = { pkgs, config, lib, ... }: { flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.remmina.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) { imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
home-manager.users.${config.info.userName}.features.applications.gui.remmina.enable = lib.mkDefault true;
} {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
remmina remmina
freerdp freerdp
]; ];
}); }) ];
}; };
flake.homeModules.graphics = { pkgs, config, lib, ... }: { flake.homeModules.graphics = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.remmina.enable) { imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
home.packages = with pkgs; [ home.packages = with pkgs; [
remmina remmina
freerdp freerdp
@@ -25,6 +23,6 @@
target = "${config.home.homeDirectory}/.local/share/remmina"; target = "${config.home.homeDirectory}/.local/share/remmina";
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/remmina"; source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/remmina";
}); });
}; }) ];
}; };
} }
@@ -0,0 +1,45 @@
{ inputs, self, ... }: let
optionName = "features.applications.gui.thunderbird.enable";
in {
imports = [
(inputs.helpers.mkStandardFeature.flakeModule "graphics" optionName "Thunderbird")
];
flake.nixosModules.graphics = { pkgs, config, ... }: {
imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
environment.systemPackages = [ pkgs.thunderbird ];
}) ];
};
flake.homeModules.graphicsOptions = { lib, ... }: {
options.features.applications.gui.thunderbird.autostart = lib.mkOption {
type = lib.types.bool;
description = "Whether to add thunderbird.desktop to `$XDG_CONFIG_HOME/autostart`.";
default = false;
};
};
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
home.packages = [ pkgs.thunderbird ];
xdg.configFile."autostart/thunderbird.desktop" = lib.mkIf (config.features.applications.gui.thunderbird.autostart) {
text = ''
[Desktop Entry]
Categories=Network;Chat;Email;Feed;GTK;News
Comment=Read and write e-mails or RSS feeds, or manage tasks on calendars.
Exec=${pkgs.thunderbird}/bin/thunderbird --name thunderbird %U
GenericName=Email Client
Icon=thunderbird
MimeType=message/rfc822;x-scheme-handler/mailto;text/calendar;text/x-vcard
Name=Thunderbird
StartupNotify=true
StartupWMClass=thunderbird
Terminal=false
Type=Application
Version=1.5
'';
force = true;
};
}) ];
};
}
+10 -12
View File
@@ -1,31 +1,29 @@
{ inputs, self, ... }: { { inputs, self, ... }: let
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: { optionName = "features.applications.gui.vscode.enable";
options.features.applications.gui.vscode.enable = lib.mkEnableOption "VS Code"; in {
})) ]; imports = [ (inputs.helpers.mkStandardFeature.flakeModule "graphics" optionName "VS Code") ];
flake.nixosModules.graphics = { config, pkgs, lib, ... }: { flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.vscode.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) { imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
home-manager.users.${config.info.userName}.features.applications.gui.vscode.enable = lib.mkDefault true;
} {
environment.systemPackages = [ pkgs.vscode ]; environment.systemPackages = [ pkgs.vscode ];
}); }) ];
}; };
flake.homeModules.graphics = { config, pkgs, lib, ... }: { flake.homeModules.graphics = { config, pkgs, lib, ... }: {
config = lib.mkIf (config.features.applications.gui.vscode.enable) { imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
home.packages = [ pkgs.vscode ]; home.packages = [ pkgs.vscode ];
home.activation = { home.activation = {
linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.xdg.configHome}/Code/User/settings.json"; target = "${config.xdg.configHome}/Code/User/settings.json";
source = "${config.info.rootPath}/dotfiles/global/vscode/settings.json"; source = "${config.info.rootPath}/dotfiles/shared/vscode/settings.json";
}); });
linkVsCodeConfigKeybindings = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript { linkVsCodeConfigKeybindings = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.xdg.configHome}/Code/User/keybindings.json"; target = "${config.xdg.configHome}/Code/User/keybindings.json";
source = "${config.info.rootPath}/dotfiles/global/vscode/keybindings.json"; source = "${config.info.rootPath}/dotfiles/shared/vscode/keybindings.json";
}); });
}; };
}; }) ];
}; };
} }
@@ -5,6 +5,8 @@
flake.nixosModules.gaming = { pkgs, config, lib, ... }: { flake.nixosModules.gaming = { pkgs, config, lib, ... }: {
config = lib.mkIf (config.features.hardware.steam-controller.enable) { config = lib.mkIf (config.features.hardware.steam-controller.enable) {
hardware.steam-hardware.enable = lib.mkForce true; # most likely enabled somewhere else but should be enforced here regardless
home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) { home-manager.users.${config.info.userName} = lib.mkIf (config.features.nixos.home-manager.enable) {
features.hardware.steam-controller.enable = lib.mkDefault true; features.hardware.steam-controller.enable = lib.mkDefault true;
}; };
@@ -14,8 +16,8 @@
flake.homeModules.gaming = { pkgs, config, lib, inputs, ... }: { flake.homeModules.gaming = { pkgs, config, lib, inputs, ... }: {
config = let config = let
pkgsCross = import inputs.nixpkgs { pkgsCross = import inputs.nixpkgs {
localSystem = "x86_64-linux"; localSystem = pkgs.stdenv.hostPlatform.system;
hostSystem = "x86_64-linux"; hostSystem = pkgs.stdenv.hostPlatform.system;
crossSystem = "i686-linux"; crossSystem = "i686-linux";
}; };
steam-modified-desktop-file = pkgs.runCommand "modifySteamDesktopFile" {} '' steam-modified-desktop-file = pkgs.runCommand "modifySteamDesktopFile" {} ''
+1
View File
@@ -30,6 +30,7 @@
applications = { applications = {
gui = { gui = {
nautilus.enable = true;
kitty.enable = true; kitty.enable = true;
vscode.enable = true; vscode.enable = true;
equibop.enable = true; equibop.enable = true;
+12 -6
View File
@@ -31,8 +31,8 @@
}; };
components = { components = {
windowManagers = "niri"; windowManagers = [ "biri" ];
shells = "noctalia"; shells = [ "noctalia" ];
}; };
features = { features = {
@@ -67,15 +67,19 @@
theme = "comfy"; theme = "comfy";
}; };
}; };
thunderbird = {
enable = true;
};
}; };
extraPackages = with pkgs; [ extraPackages = with pkgs; [
nix-init nix-init
github-desktop github-desktop
signal-desktop
]; ];
shellScripts = let shellScripts = let
mkBrightnessScript = direction: '' mkBrightnessScript = direction: scriptName: ''
LOOP_COUNTER=0 LOOP_COUNTER=0
DEVICE=$1 DEVICE=$1
PRETTY_NAME=$(sudo ddccontrol dev:$DEVICE 2>&1 >/dev/null | grep -oP "/usr/share/ddccontrol-db/monitor/\K.+\.xml" | sed 's/.xml//') PRETTY_NAME=$(sudo ddccontrol dev:$DEVICE 2>&1 >/dev/null | grep -oP "/usr/share/ddccontrol-db/monitor/\K.+\.xml" | sed 's/.xml//')
@@ -88,7 +92,7 @@
LOOP_COUNTER=$(($LOOP_COUNTER + 1)) LOOP_COUNTER=$(($LOOP_COUNTER + 1))
done done
noctalia msg notification-show "Set brightness to $WRITTEN for display $PRETTY_NAME" notify-send -e -a "${scriptName}" "Set brightness to $WRITTEN for display $PRETTY_NAME"
''; '';
in { in {
switch-os = '' switch-os = ''
@@ -109,14 +113,16 @@
if [ "$bypass_value" = "1" ]; then if [ "$bypass_value" = "1" ]; then
easyeffects -b 2 easyeffects -b 2
notify-send -e -a "toggle-easyeffects script" "Easy Effects enabled"
else else
easyeffects -b 1 easyeffects -b 1
notify-send -e -a "toggle-easyeffects script" "Easy Effects disabled"
fi fi
''; '';
increase-brightness = mkBrightnessScript "+"; increase-brightness = mkBrightnessScript "+" "increase-brightness script";
decrease-brightness = mkBrightnessScript "-"; decrease-brightness = mkBrightnessScript "-" "decrease-brightness script";
}; };
}; };
}; };