summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-01-23 14:37:58 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2025-01-23 14:37:58 +0100
commit11bbb2a99fb6a8741522830d8d3e9c2d90d4e5d5 (patch)
treec5506cea25ad516d7f28ac8bddb04245b5bd3603
parent07496f4fd71e711859fab2cc858d2c440053f20c (diff)
downloadnixos-11bbb2a99fb6a8741522830d8d3e9c2d90d4e5d5.tar
nixos-11bbb2a99fb6a8741522830d8d3e9c2d90d4e5d5.tar.gz
nixos-11bbb2a99fb6a8741522830d8d3e9c2d90d4e5d5.tar.bz2
nixos-11bbb2a99fb6a8741522830d8d3e9c2d90d4e5d5.tar.xz
nixos-11bbb2a99fb6a8741522830d8d3e9c2d90d4e5d5.zip
...
-rw-r--r--accounts/gkleen@sif/default.nix5
-rw-r--r--accounts/gkleen@sif/niri/default.nix33
-rw-r--r--accounts/gkleen@sif/niri/mako.nix1
-rw-r--r--accounts/gkleen@sif/systemd.nix30
-rw-r--r--flake.lock12
-rw-r--r--hosts/sif/default.nix34
-rw-r--r--hosts/sif/greetd/.gitattributes1
-rw-r--r--hosts/sif/greetd/default.nix44
-rw-r--r--hosts/sif/greetd/wallpaper.png3
-rw-r--r--hosts/sif/mail/default.nix2
10 files changed, 117 insertions, 48 deletions
diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix
index 10180eca..7f4879f4 100644
--- a/accounts/gkleen@sif/default.nix
+++ b/accounts/gkleen@sif/default.nix
@@ -427,6 +427,7 @@ in {
427 pynitrokey gtklock wlrctl remmina openscad spice-record 427 pynitrokey gtklock wlrctl remmina openscad spice-record
428 libguestfs-with-appliance nerd-fonts.fira-mono 428 libguestfs-with-appliance nerd-fonts.fira-mono
429 nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts 429 nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts
430 swtpm
430 ]; 431 ];
431 432
432 file = { 433 file = {
@@ -492,6 +493,10 @@ in {
492 }; 493 };
493 }; 494 };
494 "emacs/init.el".source = ./emacs.el; 495 "emacs/init.el".source = ./emacs.el;
496 "systemd/user/xdg-desktop-portal.service.d/after-graphical-session.conf".text = ''
497 [Unit]
498 After=graphical-session.target
499 '';
495 }; 500 };
496 501
497 xdg.dataFile = { 502 xdg.dataFile = {
diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix
index 165eb5fa..71870aa4 100644
--- a/accounts/gkleen@sif/niri/default.nix
+++ b/accounts/gkleen@sif/niri/default.nix
@@ -200,6 +200,8 @@ in {
200 DISPLAY = ":0"; 200 DISPLAY = ":0";
201 }; 201 };
202 202
203 debug.render-drm-device = "/dev/dri/by-path/pci-0000:00:02.0-render";
204
203 layout = { 205 layout = {
204 gaps = 8; 206 gaps = 8;
205 struts = { left = 0; right = 0; top = 0; bottom = 0; }; 207 struts = { left = 0; right = 0; top = 0; bottom = 0; };
@@ -239,6 +241,14 @@ in {
239 241
240 cursor.hide-when-typing = true; 242 cursor.hide-when-typing = true;
241 243
244 input = {
245 touchpad.enable = false;
246 trackball = {
247 scroll-method = "on-button-down";
248 scroll-button = 278;
249 };
250 };
251
242 workspaces = { 252 workspaces = {
243 "001" = { name = "pwctl"; open-on-output = "eDP-1"; }; 253 "001" = { name = "pwctl"; open-on-output = "eDP-1"; };
244 "002" = { name = "kpxc"; open-on-output = "eDP-1"; }; 254 "002" = { name = "kpxc"; open-on-output = "eDP-1"; };
@@ -250,6 +260,7 @@ in {
250 # "104".name = "read"; 260 # "104".name = "read";
251 # "105".name = "mon"; 261 # "105".name = "mon";
252 "110".name = "vid"; 262 "110".name = "vid";
263 "120".name = "bmr";
253 }; 264 };
254 265
255 window-rules = [ 266 window-rules = [
@@ -356,6 +367,22 @@ in {
356 # ]; 367 # ];
357 # open-on-workspace = "mon"; 368 # open-on-workspace = "mon";
358 # } 369 # }
370 {
371 matches = [ { app-id = "^pdfpc$"; } ];
372 default-column-width.proportion = 1.;
373 }
374 {
375 matches = [ { app-id = "^pdfpc$"; title = "^pdfpc - presentation"; } ];
376 open-on-workspace = "bmr";
377 open-fullscreen = true;
378 }
379 {
380 matches = [
381 { app-id = "^Gimp-"; title = "^Quit GIMP$"; }
382 { app-id = "^org\.kde\.polkit-kde-authentication-agent-1$"; }
383 ];
384 open-floating = true;
385 }
359 ]; 386 ];
360 layer-rules = [ 387 layer-rules = [
361 { matches = [ 388 { matches = [
@@ -414,12 +441,14 @@ in {
414 fi 441 fi
415 [[ -n "$QALC_RES" ]] || exit 1 442 [[ -n "$QALC_RES" ]] || exit 1
416 EXISTING=false 443 EXISTING=false
417 set +e 444 set +o pipefail
418 grep -Fxrl "$QALC_RES" "$RESULTS_DIR" | xargs -r touch 445 grep -Fxrl "$QALC_RES" "$RESULTS_DIR" | xargs -r touch
419 [[ ''${PIPESTATUS[0]} -eq 0 ]] && EXISTING=true 446 [[ ''${PIPESTATUS[0]} -eq 0 ]] && EXISTING=true
420 set -e 447 set -o pipefail
421 if [[ $QALC_RET -eq 0 ]] && ! $EXISTING; then 448 if [[ $QALC_RET -eq 0 ]] && ! $EXISTING; then
449 set +o pipefail
422 RES_FILE="$RESULTS_DIR"/$(date -uIs).$(tr -Cd 'a-zA-Z0-9' </dev/random | head -c 10) 450 RES_FILE="$RESULTS_DIR"/$(date -uIs).$(tr -Cd 'a-zA-Z0-9' </dev/random | head -c 10)
451 set -o pipefail
423 cat >"$RES_FILE" <<<"$QALC_RES" 452 cat >"$RES_FILE" <<<"$QALC_RES"
424 fi 453 fi
425 [[ "$QALC_RES" =~ .*\ =\ (.*) ]] && QALC_RES="''${BASH_REMATCH[1]}" 454 [[ "$QALC_RES" =~ .*\ =\ (.*) ]] && QALC_RES="''${BASH_REMATCH[1]}"
diff --git a/accounts/gkleen@sif/niri/mako.nix b/accounts/gkleen@sif/niri/mako.nix
index 8abf14d8..901ed022 100644
--- a/accounts/gkleen@sif/niri/mako.nix
+++ b/accounts/gkleen@sif/niri/mako.nix
@@ -13,6 +13,7 @@
13 extraConfig = '' 13 extraConfig = ''
14 outer-margin=1 14 outer-margin=1
15 max-history=100 15 max-history=100
16 max-icon-size=48
16 17
17 [grouped] 18 [grouped]
18 format=<b>(%g)</b> <i>%s</i>\n%b 19 format=<b>(%g)</b> <i>%s</i>\n%b
diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix
index 34f52172..bce2f4cd 100644
--- a/accounts/gkleen@sif/systemd.nix
+++ b/accounts/gkleen@sif/systemd.nix
@@ -123,7 +123,8 @@ in {
123 }; 123 };
124 emacs = { 124 emacs = {
125 Unit = { 125 Unit = {
126 After = ["graphical-session-pre.target"]; 126 After = [ "graphical-session.target" ];
127 BindsTo = [ "graphical-session.target" ];
127 }; 128 };
128 }; 129 };
129 keepassxc = { 130 keepassxc = {
@@ -135,8 +136,8 @@ in {
135 Environment = [ "QT_QPA_PLATFORM=wayland" ]; 136 Environment = [ "QT_QPA_PLATFORM=wayland" ];
136 }; 137 };
137 Unit = { 138 Unit = {
138 Requires = ["graphical-session-pre.target"]; 139 After = [ "graphical-session.target" ];
139 After = ["graphical-session-pre.target"]; 140 BindsTo = [ "graphical-session.target" ];
140 }; 141 };
141 }; 142 };
142 mpris-proxy = { 143 mpris-proxy = {
@@ -184,8 +185,8 @@ in {
184 WantedBy = ["graphical-session.target"]; 185 WantedBy = ["graphical-session.target"];
185 }; 186 };
186 Unit = { 187 Unit = {
187 Requires = ["graphical-session-pre.target"]; 188 After = [ "graphical-session.target" ];
188 After = ["graphical-session-pre.target"]; 189 PartOf = [ "graphical-session.target" ];
189 }; 190 };
190 Service = { 191 Service = {
191 ExecStart = lib.getExe pkgs.psi-notify; 192 ExecStart = lib.getExe pkgs.psi-notify;
@@ -198,6 +199,7 @@ in {
198 gtklock = { 199 gtklock = {
199 Unit = { 200 Unit = {
200 Requisite = ["graphical-session.target"]; 201 Requisite = ["graphical-session.target"];
202 After = [ "graphical-session.target" ];
201 PartOf = ["graphical-session.target"]; 203 PartOf = ["graphical-session.target"];
202 }; 204 };
203 Service = { 205 Service = {
@@ -304,8 +306,8 @@ in {
304 WantedBy = ["graphical-session.target"]; 306 WantedBy = ["graphical-session.target"];
305 }; 307 };
306 Unit = { 308 Unit = {
307 BindsTo = ["graphical-session-pre.target"]; 309 After = [ "graphical-session.target" ];
308 After = ["graphical-session-pre.target"]; 310 PartOf = [ "graphical-session.target" ];
309 }; 311 };
310 Service = { 312 Service = {
311 ExecStart = lib.getExe cfg.programs.wpaperd.package; 313 ExecStart = lib.getExe cfg.programs.wpaperd.package;
@@ -314,6 +316,17 @@ in {
314 RestartSec = "2s"; 316 RestartSec = "2s";
315 }; 317 };
316 }; 318 };
319 xembed-sni-proxy = {
320 Unit = {
321 BindsTo = ["xwayland-satellite.service"];
322 After = ["xwayland-satellite.service"];
323 };
324 };
325 poweralertd = {
326 Unit = {
327 After = ["graphical-session.target"];
328 };
329 };
317 } // listToAttrs (map ({host, port}: nameValuePair "proxy-to-autossh-socks@${toString port}" { 330 } // listToAttrs (map ({host, port}: nameValuePair "proxy-to-autossh-socks@${toString port}" {
318 Unit = { 331 Unit = {
319 Requires = ["autossh-socks@${host}:${toString (port + 1)}.service" "proxy-to-autossh-socks@${toString port}.socket"]; 332 Requires = ["autossh-socks@${host}:${toString (port + 1)}.service" "proxy-to-autossh-socks@${toString port}.socket"];
@@ -364,6 +377,9 @@ in {
364 }; 377 };
365 tray = { 378 tray = {
366 Unit = { 379 Unit = {
380 PartOf = [ "graphical-session.target" ];
381 Requires = [ "waybar.service" ];
382 After = [ "graphical-session.target" "waybar.service" ];
367 Wants = ["blueman-applet.service" "udiskie.service" "network-manager-applet.service"]; 383 Wants = ["blueman-applet.service" "udiskie.service" "network-manager-applet.service"];
368 }; 384 };
369 }; 385 };
diff --git a/flake.lock b/flake.lock
index ce7e59e4..1697d69e 100644
--- a/flake.lock
+++ b/flake.lock
@@ -397,11 +397,11 @@
397 "xwayland-satellite-unstable": "xwayland-satellite-unstable" 397 "xwayland-satellite-unstable": "xwayland-satellite-unstable"
398 }, 398 },
399 "locked": { 399 "locked": {
400 "lastModified": 1736855225, 400 "lastModified": 1737627930,
401 "narHash": "sha256-2+ayH/0B37BLPJy4thO1titHIrVCoDdCtdnl0CyV8kc=", 401 "narHash": "sha256-oaAatwNVaX36xmI2AKIVu2oG07XJmHq2T+Y66hEprd8=",
402 "owner": "sodiboo", 402 "owner": "sodiboo",
403 "repo": "niri-flake", 403 "repo": "niri-flake",
404 "rev": "b013bedcff63b5cdbb9cd9841ac339361fc5cfcc", 404 "rev": "f79aa307f4bc0bfbabee404e6354fd2a1edfcb01",
405 "type": "github" 405 "type": "github"
406 }, 406 },
407 "original": { 407 "original": {
@@ -630,11 +630,11 @@
630 }, 630 },
631 "nixpkgs-stable_2": { 631 "nixpkgs-stable_2": {
632 "locked": { 632 "locked": {
633 "lastModified": 1736684107, 633 "lastModified": 1737569578,
634 "narHash": "sha256-vH5mXxEvZeoGNkqKoCluhTGfoeXCZ1seYhC2pbMN0sg=", 634 "narHash": "sha256-6qY0pk2QmUtBT9Mywdvif0i/CLVgpCjMUn6g9vB+f3M=",
635 "owner": "NixOS", 635 "owner": "NixOS",
636 "repo": "nixpkgs", 636 "repo": "nixpkgs",
637 "rev": "635e887b48521e912a516625eee7df6cf0eba9c1", 637 "rev": "47addd76727f42d351590c905d9d1905ca895b82",
638 "type": "github" 638 "type": "github"
639 }, 639 },
640 "original": { 640 "original": {
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix
index 655b2e9c..7db46c67 100644
--- a/hosts/sif/default.nix
+++ b/hosts/sif/default.nix
@@ -12,7 +12,7 @@ let
12in { 12in {
13 imports = with flake.nixosModules.systemProfiles; [ 13 imports = with flake.nixosModules.systemProfiles; [
14 ./hw.nix 14 ./hw.nix
15 ./mail ./libvirt 15 ./mail ./libvirt ./greetd
16 tmpfs-root bcachefs initrd-all-crypto-modules default-locale openssh rebuild-machines niri-unstable networkmanager 16 tmpfs-root bcachefs initrd-all-crypto-modules default-locale openssh rebuild-machines niri-unstable networkmanager
17 flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 17 flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1
18 flakeInputs.impermanence.nixosModules.impermanence 18 flakeInputs.impermanence.nixosModules.impermanence
@@ -470,39 +470,8 @@ in {
470 exportConfiguration = true; 470 exportConfiguration = true;
471 }; 471 };
472 libinput.enable = true; 472 libinput.enable = true;
473
474 greetd = {
475 enable = true;
476 # settings.default_session.command = let
477 # cfg = config.programs.regreet;
478 # in pkgs.writeShellScript "greeter" ''
479 # modprobe -r nvidia_drm
480
481 # exec ${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package}
482 # '';
483 };
484 }; 473 };
485 474
486 programs.regreet = {
487 enable = true;
488 theme = {
489 package = pkgs.equilux-theme;
490 name = "Equilux-compact";
491 };
492 iconTheme = {
493 package = pkgs.paper-icon-theme;
494 name = "Paper-Mono-Dark";
495 };
496 font = {
497 package = pkgs.fira;
498 name = "Fira Sans";
499 # size = 6;
500 };
501 cageArgs = [ "-s" "-m" "last" ];
502 settings = {
503 GTK.application_prefer_dark_theme = true;
504 };
505 };
506 programs.niri.enable = true; 475 programs.niri.enable = true;
507 476
508 systemd.tmpfiles.settings = { 477 systemd.tmpfiles.settings = {
@@ -702,6 +671,7 @@ in {
702 671
703 services.dbus.packages = with pkgs; 672 services.dbus.packages = with pkgs;
704 [ dbus dconf 673 [ dbus dconf
674 xdg-desktop-portal-gtk
705 ]; 675 ];
706 676
707 services.udisks2.enable = true; 677 services.udisks2.enable = true;
diff --git a/hosts/sif/greetd/.gitattributes b/hosts/sif/greetd/.gitattributes
new file mode 100644
index 00000000..3e1848c2
--- /dev/null
+++ b/hosts/sif/greetd/.gitattributes
@@ -0,0 +1 @@
wallpaper.png filter=lfs diff=lfs merge=lfs -text
diff --git a/hosts/sif/greetd/default.nix b/hosts/sif/greetd/default.nix
new file mode 100644
index 00000000..f609fc05
--- /dev/null
+++ b/hosts/sif/greetd/default.nix
@@ -0,0 +1,44 @@
1{ pkgs, ... }:
2{
3 config = {
4 services.greetd = {
5 enable = true;
6 # settings.default_session.command = let
7 # cfg = config.programs.regreet;
8 # in pkgs.writeShellScript "greeter" ''
9 # modprobe -r nvidia_drm
10
11 # exec ${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package}
12 # '';
13 };
14 programs.regreet = {
15 enable = true;
16 theme = {
17 package = pkgs.equilux-theme;
18 name = "Equilux-compact";
19 };
20 iconTheme = {
21 package = pkgs.paper-icon-theme;
22 name = "Paper-Mono-Dark";
23 };
24 font = {
25 package = pkgs.fira;
26 name = "Fira Sans";
27 # size = 6;
28 };
29 cageArgs = [ "-s" "-m" "last" ];
30 settings = {
31 GTK.application_prefer_dark_theme = true;
32 widget.clock.format = "%F %H:%M:%S%:z";
33 background = {
34 path = pkgs.runCommand "wallpaper.png" {
35 buildInputs = with pkgs; [ imagemagick ];
36 } ''
37 magick ${./wallpaper.png} -filter Gaussian -resize 6.25% -define filter:sigma=2.5 -resize 1600% "$out"
38 '';
39 fit = "Cover";
40 };
41 };
42 };
43 };
44}
diff --git a/hosts/sif/greetd/wallpaper.png b/hosts/sif/greetd/wallpaper.png
new file mode 100644
index 00000000..f6f6c818
--- /dev/null
+++ b/hosts/sif/greetd/wallpaper.png
@@ -0,0 +1,3 @@
1version https://git-lfs.github.com/spec/v1
2oid sha256:fe030fabe1a9adcfc0742e794abe9b595831c1b1b9653f3f9794901297413ffa
3size 6073128
diff --git a/hosts/sif/mail/default.nix b/hosts/sif/mail/default.nix
index f36cd599..8d6cd705 100644
--- a/hosts/sif/mail/default.nix
+++ b/hosts/sif/mail/default.nix
@@ -1,4 +1,4 @@
1{ config, pkgs, ... }: 1{ config, lib, pkgs, ... }:
2{ 2{
3 services.postfix = { 3 services.postfix = {
4 enable = true; 4 enable = true;