diff options
Diffstat (limited to 'hosts/sif')
-rw-r--r-- | hosts/sif/default.nix | 96 | ||||
-rw-r--r-- | hosts/sif/greetd/default.nix | 44 | ||||
-rw-r--r-- | hosts/sif/greetd/wallpaper.png | bin | 0 -> 6073128 bytes | |||
-rw-r--r-- | hosts/sif/hw.nix | 3 | ||||
-rw-r--r-- | hosts/sif/libvirt/default.nix | 1 | ||||
-rw-r--r-- | hosts/sif/mail/default.nix | 2 |
6 files changed, 89 insertions, 57 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 09d43109..32651e14 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix | |||
@@ -12,9 +12,8 @@ let | |||
12 | in { | 12 | in { |
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 | 16 | tmpfs-root bcachefs initrd-all-crypto-modules default-locale openssh rebuild-machines niri-unstable networkmanager |
17 | networkmanager | ||
18 | flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 | 17 | flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 |
19 | flakeInputs.impermanence.nixosModules.impermanence | 18 | flakeInputs.impermanence.nixosModules.impermanence |
20 | flakeInputs.nixVirt.nixosModules.default | 19 | flakeInputs.nixVirt.nixosModules.default |
@@ -64,15 +63,20 @@ in { | |||
64 | plymouth.enable = true; | 63 | plymouth.enable = true; |
65 | 64 | ||
66 | kernelPackages = pkgs.linuxPackages_latest; | 65 | kernelPackages = pkgs.linuxPackages_latest; |
67 | extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; | ||
68 | kernelModules = ["v4l2loopback"]; | ||
69 | kernelPatches = [ | 66 | kernelPatches = [ |
70 | { name = "edac-config"; | 67 | { name = "edac-config"; |
71 | patch = null; | 68 | patch = null; |
72 | extraConfig = '' | 69 | extraStructuredConfig = with lib.kernel; { |
73 | EDAC y | 70 | EDAC = yes; |
74 | EDAC_IE31200 y | 71 | EDAC_IE31200 = yes; |
75 | ''; | 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 | }; | ||
76 | } | 80 | } |
77 | ]; | 81 | ]; |
78 | 82 | ||
@@ -441,7 +445,7 @@ in { | |||
441 | }; | 445 | }; |
442 | 446 | ||
443 | xserver = { | 447 | xserver = { |
444 | enable = true; | 448 | enable = false; |
445 | 449 | ||
446 | xkb = { | 450 | xkb = { |
447 | layout = "us"; | 451 | layout = "us"; |
@@ -467,40 +471,9 @@ in { | |||
467 | }; | 471 | }; |
468 | libinput.enable = true; | 472 | libinput.enable = true; |
469 | 473 | ||
470 | greetd = { | 474 | envfs.enable = false; |
471 | enable = true; | ||
472 | # settings.default_session.command = let | ||
473 | # cfg = config.programs.regreet; | ||
474 | # in pkgs.writeShellScript "greeter" '' | ||
475 | # modprobe -r nvidia_drm | ||
476 | |||
477 | # exec ${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.cage} ${lib.escapeShellArgs cfg.cageArgs} -- ${lib.getExe cfg.package} | ||
478 | # ''; | ||
479 | }; | ||
480 | }; | 475 | }; |
481 | 476 | ||
482 | programs.regreet = { | ||
483 | enable = true; | ||
484 | theme = { | ||
485 | package = pkgs.equilux-theme; | ||
486 | name = "Equilux-compact"; | ||
487 | }; | ||
488 | iconTheme = { | ||
489 | package = pkgs.paper-icon-theme; | ||
490 | name = "Paper-Mono-Dark"; | ||
491 | }; | ||
492 | font = { | ||
493 | package = pkgs.fira; | ||
494 | name = "Fira Sans"; | ||
495 | # size = 6; | ||
496 | }; | ||
497 | cageArgs = [ "-s" "-m" "last" ]; | ||
498 | settings = { | ||
499 | GTK.application_prefer_dark_theme = true; | ||
500 | }; | ||
501 | }; | ||
502 | programs.niri.enable = true; | ||
503 | |||
504 | systemd.tmpfiles.settings = { | 477 | systemd.tmpfiles.settings = { |
505 | "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime"; | 478 | "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime"; |
506 | 479 | ||
@@ -616,15 +589,15 @@ in { | |||
616 | }; | 589 | }; |
617 | 590 | ||
618 | nvidia = { | 591 | nvidia = { |
619 | open = true; | 592 | open = false; |
620 | modesetting.enable = true; | 593 | modesetting.enable = true; |
621 | powerManagement.enable = true; | 594 | powerManagement.enable = true; |
622 | prime = { | 595 | # prime = { |
623 | nvidiaBusId = "PCI:1:0:0"; | 596 | # nvidiaBusId = "PCI:1:0:0"; |
624 | intelBusId = "PCI:0:2:0"; | 597 | # intelBusId = "PCI:0:2:0"; |
625 | reverseSync.enable = true; | 598 | # reverseSync.enable = true; |
626 | offload.enableOffloadCmd = true; | 599 | # offload.enableOffloadCmd = true; |
627 | }; | 600 | # }; |
628 | }; | 601 | }; |
629 | 602 | ||
630 | graphics = { | 603 | graphics = { |
@@ -698,6 +671,7 @@ in { | |||
698 | 671 | ||
699 | services.dbus.packages = with pkgs; | 672 | services.dbus.packages = with pkgs; |
700 | [ dbus dconf | 673 | [ dbus dconf |
674 | xdg-desktop-portal-gtk | ||
701 | ]; | 675 | ]; |
702 | 676 | ||
703 | services.udisks2.enable = true; | 677 | services.udisks2.enable = true; |
@@ -706,12 +680,8 @@ in { | |||
706 | light.enable = true; | 680 | light.enable = true; |
707 | wireshark.enable = true; | 681 | wireshark.enable = true; |
708 | dconf.enable = true; | 682 | dconf.enable = true; |
709 | }; | 683 | niri.enable = true; |
710 | 684 | fuse.userAllowOther = true; | |
711 | zramSwap = { | ||
712 | enable = true; | ||
713 | algorithm = "zstd"; | ||
714 | writebackDevice = "/dev/disk/by-label/swap"; | ||
715 | }; | 685 | }; |
716 | 686 | ||
717 | services.pcscd.enable = true; | 687 | services.pcscd.enable = true; |
@@ -731,6 +701,16 @@ in { | |||
731 | environment.sessionVariables."GTK_USE_PORTAL" = "1"; | 701 | environment.sessionVariables."GTK_USE_PORTAL" = "1"; |
732 | xdg.portal = { | 702 | xdg.portal = { |
733 | enable = true; | 703 | enable = true; |
704 | extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; | ||
705 | config.niri = { | ||
706 | default = ["gnome" "gtk"]; | ||
707 | "org.freedesktop.impl.portal.FileChooser" = ["gtk"]; | ||
708 | "org.freedesktop.impl.portal.OpenFile" = ["gtk"]; | ||
709 | "org.freedesktop.impl.portal.Access" = ["gtk"]; | ||
710 | "org.freedesktop.impl.portal.Notification" = ["gtk"]; | ||
711 | "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; | ||
712 | "org.freedesktop.impl.portal.Inhibit" = ["none"]; | ||
713 | }; | ||
734 | }; | 714 | }; |
735 | 715 | ||
736 | environment.persistence."/.bcachefs" = { | 716 | environment.persistence."/.bcachefs" = { |
@@ -738,11 +718,11 @@ in { | |||
738 | directories = [ | 718 | directories = [ |
739 | "/nix" | 719 | "/nix" |
740 | "/root" | 720 | "/root" |
721 | "/home" | ||
741 | "/var/log" | 722 | "/var/log" |
742 | "/var/lib/sops-nix" | 723 | "/var/lib/sops-nix" |
743 | "/var/lib/nixos" | 724 | "/var/lib/nixos" |
744 | "/var/lib/systemd" | 725 | "/var/lib/systemd" |
745 | "/home" | ||
746 | "/var/lib/chrony" | 726 | "/var/lib/chrony" |
747 | "/var/lib/fprint" | 727 | "/var/lib/fprint" |
748 | "/var/lib/bluetooth" | 728 | "/var/lib/bluetooth" |
@@ -771,6 +751,10 @@ in { | |||
771 | 751 | ||
772 | home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ]; | 752 | home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ]; |
773 | 753 | ||
754 | environment.pathsToLink = [ | ||
755 | "share/zsh" | ||
756 | ]; | ||
757 | |||
774 | system.stateVersion = "24.11"; | 758 | system.stateVersion = "24.11"; |
775 | }; | 759 | }; |
776 | } | 760 | } |
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..20fc761a --- /dev/null +++ b/hosts/sif/greetd/wallpaper.png | |||
Binary files differ | |||
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 = [ |
diff --git a/hosts/sif/libvirt/default.nix b/hosts/sif/libvirt/default.nix index d0be7dff..9712d0d9 100644 --- a/hosts/sif/libvirt/default.nix +++ b/hosts/sif/libvirt/default.nix | |||
@@ -8,6 +8,7 @@ with flakeInputs.nixVirt.lib; | |||
8 | qemu.swtpm.enable = true; | 8 | qemu.swtpm.enable = true; |
9 | allowedBridges = ["virbr0" "rz-0971" "rz-2403"]; | 9 | allowedBridges = ["virbr0" "rz-0971" "rz-2403"]; |
10 | }; | 10 | }; |
11 | virtualisation.spiceUSBRedirection.enable = true; | ||
11 | virtualisation.libvirt = { | 12 | virtualisation.libvirt = { |
12 | enable = true; | 13 | enable = true; |
13 | swtpm.enable = true; | 14 | swtpm.enable = true; |
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; |