summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-01-15 22:24:51 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2025-01-15 22:24:56 +0100
commitcbece5e2ab15670c31f76e194a82516490760b16 (patch)
treeb9caf601eb3f8a5e95dd959b7baa26a2d6f3f814
parent52ee4685575fac5159b42ee6eb0612bd8a7bf68b (diff)
downloadnixos-cbece5e2ab15670c31f76e194a82516490760b16.tar
nixos-cbece5e2ab15670c31f76e194a82516490760b16.tar.gz
nixos-cbece5e2ab15670c31f76e194a82516490760b16.tar.bz2
nixos-cbece5e2ab15670c31f76e194a82516490760b16.tar.xz
nixos-cbece5e2ab15670c31f76e194a82516490760b16.zip
...
-rw-r--r--accounts/gkleen@sif/niri/default.nix24
-rw-r--r--hosts/sif/default.nix27
-rw-r--r--hosts/sif/hw.nix3
3 files changed, 36 insertions, 18 deletions
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix
index fc3a0a2b..aa109616 100644
--- a/accounts/gkleen@sif/niri/default.nix
+++ b/accounts/gkleen@sif/niri/default.nix
@@ -91,7 +91,7 @@ let
91 active_workspace="$(jq -r '.[] | select(.is_focused) | .id' <<<"$workspaces_json")" 91 active_workspace="$(jq -r '.[] | select(.is_focused) | .id' <<<"$workspaces_json")"
92 92
93 workspace_json="$(jq -c --arg active_output "$active_output" 'map(select(.output == $active_output and .name == null)) | sort_by(.idx) | .[0]' <<<"$workspaces_json")" 93 workspace_json="$(jq -c --arg active_output "$active_output" 'map(select(.output == $active_output and .name == null)) | sort_by(.idx) | .[0]' <<<"$workspaces_json")"
94 [[ -n $workspace_json && $workspace_json != null && $active_workspace != "$(jq -r '.id' <<<"$workspace_json")" ]] || exit 0 94 [[ -n $workspace_json && $workspace_json != null ]] || exit 0
95 jq --arg active_workspace "$active_workspace" -c "$action" <<<"$workspace_json" | tee /dev/stderr | socat STDIO "$NIRI_SOCKET" 95 jq --arg active_workspace "$active_workspace" -c "$action" <<<"$workspace_json" | tee /dev/stderr | socat STDIO "$NIRI_SOCKET"
96 ''; 96 '';
97 }; 97 };
@@ -174,6 +174,18 @@ in {
174 struts = { left = 0; right = 0; top = 0; bottom = 0; }; 174 struts = { left = 0; right = 0; top = 0; bottom = 0; };
175 focus-ring = { 175 focus-ring = {
176 width = 2; 176 width = 2;
177 active.gradient = {
178 from = "hsla(195 100% 60% 0.9)";
179 to = "hsla(155 100% 50% 0.9)";
180 angle = 45;
181 relative-to = "workspace-view";
182 };
183 inactive.gradient = {
184 from = "hsla(0 0% 42% 0.66)";
185 to = "hsla(0 0% 35% 0.66)";
186 angle = 45;
187 relative-to = "workspace-view";
188 };
177 }; 189 };
178 190
179 preset-column-widths = [ 191 preset-column-widths = [
@@ -406,10 +418,14 @@ in {
406 action = spawn (lib.getExe niri) "msg" "action" "power-off-monitors"; 418 action = spawn (lib.getExe niri) "msg" "action" "power-off-monitors";
407 allow-when-locked = true; 419 allow-when-locked = true;
408 }; 420 };
409 "Mod+Shift+L" = { 421 "Mod+Shift+L".action = spawn loginctl "lock-session";
410 action = spawn loginctl "lock-session";
411 };
412 "Mod+Shift+E".action = quit; 422 "Mod+Shift+E".action = quit;
423 "Mod+Shift+Minus" = {
424 action = spawn systemctl "suspend";
425 };
426 "Mod+Shift+Control+Minus" = {
427 action = spawn systemctl "hibernate";
428 };
413 429
414 "XF86MonBrightnessUp" = { 430 "XF86MonBrightnessUp" = {
415 action = spawn lightctl "-d" "-e4" "-n1" "up"; 431 action = spawn lightctl "-d" "-e4" "-n1" "up";
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix
index 6dc6f3a9..def59191 100644
--- a/hosts/sif/default.nix
+++ b/hosts/sif/default.nix
@@ -63,15 +63,20 @@ in {
63 plymouth.enable = true; 63 plymouth.enable = true;
64 64
65 kernelPackages = pkgs.linuxPackages_latest; 65 kernelPackages = pkgs.linuxPackages_latest;
66 extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
67 kernelModules = ["v4l2loopback"];
68 kernelPatches = [ 66 kernelPatches = [
69 { name = "edac-config"; 67 { name = "edac-config";
70 patch = null; 68 patch = null;
71 extraConfig = '' 69 extraStructuredConfig = with lib.kernel; {
72 EDAC y 70 EDAC = yes;
73 EDAC_IE31200 y 71 EDAC_IE31200 = yes;
74 ''; 72 };
73 }
74 { name = "zswap-default";
75 patch = null;
76 extraStructuredConfig = with lib.kernel; {
77 ZSWAP_DEFAULT_ON = yes;
78 # ZSWAP_SHRINKER_DEFAULT_ON = yes;
79 };
75 } 80 }
76 ]; 81 ];
77 82
@@ -440,7 +445,7 @@ in {
440 }; 445 };
441 446
442 xserver = { 447 xserver = {
443 enable = true; 448 enable = false;
444 449
445 xkb = { 450 xkb = {
446 layout = "us"; 451 layout = "us";
@@ -617,7 +622,7 @@ in {
617 nvidia = { 622 nvidia = {
618 open = true; 623 open = true;
619 modesetting.enable = true; 624 modesetting.enable = true;
620 powerManagement.enable = true; 625 powerManagement.enable = false;
621 prime = { 626 prime = {
622 nvidiaBusId = "PCI:1:0:0"; 627 nvidiaBusId = "PCI:1:0:0";
623 intelBusId = "PCI:0:2:0"; 628 intelBusId = "PCI:0:2:0";
@@ -707,12 +712,6 @@ in {
707 dconf.enable = true; 712 dconf.enable = true;
708 }; 713 };
709 714
710 zramSwap = {
711 enable = true;
712 algorithm = "zstd";
713 writebackDevice = "/dev/disk/by-label/swap";
714 };
715
716 services.pcscd.enable = true; 715 services.pcscd.enable = true;
717 716
718 sops.secrets.gkleen-rclone = { 717 sops.secrets.gkleen-rclone = {
diff --git a/hosts/sif/hw.nix b/hosts/sif/hw.nix
index d1fb2934..1bcf0261 100644
--- a/hosts/sif/hw.nix
+++ b/hosts/sif/hw.nix
@@ -19,6 +19,9 @@
19 "/var/lib/sops-nix".neededForBoot = true; 19 "/var/lib/sops-nix".neededForBoot = true;
20 "/var/lib/systemd".neededForBoot = true; 20 "/var/lib/systemd".neededForBoot = true;
21 }; 21 };
22 swapDevices = [
23 { label = "swap"; }
24 ];
22 # system.etc.overlay.enable = false; 25 # system.etc.overlay.enable = false;
23 26
24 boot.initrd.systemd.packages = [ 27 boot.initrd.systemd.packages = [