diff options
Diffstat (limited to 'hosts/sif/default.nix')
-rw-r--r-- | hosts/sif/default.nix | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 7c8da63a..655b2e9c 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix | |||
@@ -13,8 +13,7 @@ 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 |
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 |
@@ -27,6 +26,9 @@ in { | |||
27 | allowUnfree = true; | 26 | allowUnfree = true; |
28 | pulseaudio = true; | 27 | pulseaudio = true; |
29 | }; | 28 | }; |
29 | extraOverlays = [ | ||
30 | flakeInputs.niri-flake.overlays.niri | ||
31 | ]; | ||
30 | }; | 32 | }; |
31 | 33 | ||
32 | time.timeZone = null; | 34 | time.timeZone = null; |
@@ -34,7 +36,6 @@ in { | |||
34 | boot = { | 36 | boot = { |
35 | initrd = { | 37 | initrd = { |
36 | systemd = { | 38 | systemd = { |
37 | enable = false; | ||
38 | emergencyAccess = config.users.users.root.hashedPassword; | 39 | emergencyAccess = config.users.users.root.hashedPassword; |
39 | }; | 40 | }; |
40 | luks.devices = { | 41 | luks.devices = { |
@@ -62,15 +63,20 @@ in { | |||
62 | plymouth.enable = true; | 63 | plymouth.enable = true; |
63 | 64 | ||
64 | kernelPackages = pkgs.linuxPackages_latest; | 65 | kernelPackages = pkgs.linuxPackages_latest; |
65 | extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; | ||
66 | kernelModules = ["v4l2loopback"]; | ||
67 | kernelPatches = [ | 66 | kernelPatches = [ |
68 | { name = "edac-config"; | 67 | { name = "edac-config"; |
69 | patch = null; | 68 | patch = null; |
70 | extraConfig = '' | 69 | extraStructuredConfig = with lib.kernel; { |
71 | EDAC y | 70 | EDAC = yes; |
72 | EDAC_IE31200 y | 71 | EDAC_IE31200 = yes; |
73 | ''; | 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 | }; | ||
74 | } | 80 | } |
75 | ]; | 81 | ]; |
76 | 82 | ||
@@ -439,7 +445,7 @@ in { | |||
439 | }; | 445 | }; |
440 | 446 | ||
441 | xserver = { | 447 | xserver = { |
442 | enable = true; | 448 | enable = false; |
443 | 449 | ||
444 | xkb = { | 450 | xkb = { |
445 | layout = "us"; | 451 | layout = "us"; |
@@ -497,14 +503,14 @@ in { | |||
497 | GTK.application_prefer_dark_theme = true; | 503 | GTK.application_prefer_dark_theme = true; |
498 | }; | 504 | }; |
499 | }; | 505 | }; |
500 | programs.hyprland.enable = true; | 506 | programs.niri.enable = true; |
501 | 507 | ||
502 | systemd.tmpfiles.settings = { | 508 | systemd.tmpfiles.settings = { |
503 | "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime"; | 509 | "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime"; |
504 | 510 | ||
505 | "10-regreet"."/var/cache/regreet/cache.toml".C.argument = toString ((pkgs.formats.toml {}).generate "cache.toml" { | 511 | "10-regreet"."/var/cache/regreet/cache.toml".C.argument = toString ((pkgs.formats.toml {}).generate "cache.toml" { |
506 | last_user = "gkleen"; | 512 | last_user = "gkleen"; |
507 | user_to_last_sess.gkleen = "Hyprland"; | 513 | user_to_last_sess.gkleen = "Niri"; |
508 | }); | 514 | }); |
509 | }; | 515 | }; |
510 | 516 | ||
@@ -616,7 +622,7 @@ in { | |||
616 | nvidia = { | 622 | nvidia = { |
617 | open = true; | 623 | open = true; |
618 | modesetting.enable = true; | 624 | modesetting.enable = true; |
619 | powerManagement.enable = true; | 625 | powerManagement.enable = false; |
620 | prime = { | 626 | prime = { |
621 | nvidiaBusId = "PCI:1:0:0"; | 627 | nvidiaBusId = "PCI:1:0:0"; |
622 | intelBusId = "PCI:0:2:0"; | 628 | intelBusId = "PCI:0:2:0"; |
@@ -706,12 +712,6 @@ in { | |||
706 | dconf.enable = true; | 712 | dconf.enable = true; |
707 | }; | 713 | }; |
708 | 714 | ||
709 | zramSwap = { | ||
710 | enable = true; | ||
711 | algorithm = "zstd"; | ||
712 | writebackDevice = "/dev/disk/by-label/swap"; | ||
713 | }; | ||
714 | |||
715 | services.pcscd.enable = true; | 715 | services.pcscd.enable = true; |
716 | 716 | ||
717 | sops.secrets.gkleen-rclone = { | 717 | sops.secrets.gkleen-rclone = { |
@@ -729,6 +729,16 @@ in { | |||
729 | environment.sessionVariables."GTK_USE_PORTAL" = "1"; | 729 | environment.sessionVariables."GTK_USE_PORTAL" = "1"; |
730 | xdg.portal = { | 730 | xdg.portal = { |
731 | enable = true; | 731 | enable = true; |
732 | extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; | ||
733 | config.niri = { | ||
734 | default = ["gnome" "gtk"]; | ||
735 | "org.freedesktop.impl.portal.FileChooser" = ["gtk"]; | ||
736 | "org.freedesktop.impl.portal.OpenFile" = ["gtk"]; | ||
737 | "org.freedesktop.impl.portal.Access" = ["gtk"]; | ||
738 | "org.freedesktop.impl.portal.Notification" = ["gtk"]; | ||
739 | "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; | ||
740 | "org.freedesktop.impl.portal.Inhibit" = ["none"]; | ||
741 | }; | ||
732 | }; | 742 | }; |
733 | 743 | ||
734 | environment.persistence."/.bcachefs" = { | 744 | environment.persistence."/.bcachefs" = { |
@@ -769,6 +779,10 @@ in { | |||
769 | 779 | ||
770 | home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ]; | 780 | home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ]; |
771 | 781 | ||
782 | environment.pathsToLink = [ | ||
783 | "share/zsh" | ||
784 | ]; | ||
785 | |||
772 | system.stateVersion = "24.11"; | 786 | system.stateVersion = "24.11"; |
773 | }; | 787 | }; |
774 | } | 788 | } |