diff options
Diffstat (limited to 'hosts/sif/default.nix')
-rw-r--r-- | hosts/sif/default.nix | 70 |
1 files changed, 28 insertions, 42 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index b50cad60..ed85ca17 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix | |||
@@ -12,10 +12,9 @@ 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 ./greetd | 15 | ./email ./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 lanzaboote |
17 | flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 | 17 | flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 |
18 | flakeInputs.impermanence.nixosModules.impermanence | ||
19 | flakeInputs.nixVirt.nixosModules.default | 18 | flakeInputs.nixVirt.nixosModules.default |
20 | ]; | 19 | ]; |
21 | 20 | ||
@@ -34,6 +33,10 @@ in { | |||
34 | initrd = { | 33 | initrd = { |
35 | systemd = { | 34 | systemd = { |
36 | emergencyAccess = config.users.users.root.hashedPassword; | 35 | emergencyAccess = config.users.users.root.hashedPassword; |
36 | extraBin = { | ||
37 | "vim" = lib.getExe pkgs.vim; | ||
38 | "grep" = lib.getExe pkgs.gnugrep; | ||
39 | }; | ||
37 | }; | 40 | }; |
38 | luks.devices = { | 41 | luks.devices = { |
39 | nvm0 = { device = "/dev/disk/by-uuid/bef17e86-d929-4a60-97cb-6bfa133face7"; bypassWorkqueues = true; }; | 42 | nvm0 = { device = "/dev/disk/by-uuid/bef17e86-d929-4a60-97cb-6bfa133face7"; bypassWorkqueues = true; }; |
@@ -47,13 +50,8 @@ in { | |||
47 | 50 | ||
48 | blacklistedKernelModules = [ "nouveau" ]; | 51 | blacklistedKernelModules = [ "nouveau" ]; |
49 | 52 | ||
50 | # Use the systemd-boot EFI boot loader. | 53 | lanzaboote.configurationLimit = 15; |
51 | loader = { | 54 | loader = { |
52 | systemd-boot = { | ||
53 | enable = true; | ||
54 | configurationLimit = 15; | ||
55 | netbootxyz.enable = true; | ||
56 | }; | ||
57 | efi.canTouchEfiVariables = true; | 55 | efi.canTouchEfiVariables = true; |
58 | timeout = null; | 56 | timeout = null; |
59 | }; | 57 | }; |
@@ -64,19 +62,27 @@ in { | |||
64 | kernelPatches = [ | 62 | kernelPatches = [ |
65 | { name = "edac-config"; | 63 | { name = "edac-config"; |
66 | patch = null; | 64 | patch = null; |
67 | extraStructuredConfig = with lib.kernel; { | 65 | structuredExtraConfig = with lib.kernel; { |
68 | EDAC = yes; | 66 | EDAC = yes; |
69 | EDAC_IE31200 = yes; | 67 | EDAC_IE31200 = yes; |
70 | }; | 68 | }; |
71 | } | 69 | } |
72 | { name = "zswap-default"; | 70 | { name = "zswap-default"; |
73 | patch = null; | 71 | patch = null; |
74 | extraStructuredConfig = with lib.kernel; { | 72 | structuredExtraConfig = with lib.kernel; { |
75 | ZSWAP_DEFAULT_ON = yes; | 73 | ZSWAP_DEFAULT_ON = yes; |
76 | ZSWAP_SHRINKER_DEFAULT_ON = yes; | 74 | ZSWAP_SHRINKER_DEFAULT_ON = yes; |
77 | }; | 75 | }; |
78 | } | 76 | } |
79 | ]; | 77 | ]; |
78 | consoleLogLevel = 3; | ||
79 | kernelParams = [ | ||
80 | "quiet" | ||
81 | "boot.shell_on_fail" | ||
82 | "udev.log_priority=3" | ||
83 | "rd.systemd.show_status=auto" | ||
84 | "plymouth.use-simpledrm" | ||
85 | ]; | ||
80 | 86 | ||
81 | tmp.useTmpfs = true; | 87 | tmp.useTmpfs = true; |
82 | 88 | ||
@@ -98,6 +104,8 @@ in { | |||
98 | server ptbtime2.ptb.de prefer iburst nts | 104 | server ptbtime2.ptb.de prefer iburst nts |
99 | server ptbtime3.ptb.de prefer iburst nts | 105 | server ptbtime3.ptb.de prefer iburst nts |
100 | server ptbtime4.ptb.de prefer iburst nts | 106 | server ptbtime4.ptb.de prefer iburst nts |
107 | pool ntppool1.time.nl prefer iburst nts | ||
108 | pool ntppool2.time.nl prefer iburst nts | ||
101 | 109 | ||
102 | authselectmode require | 110 | authselectmode require |
103 | minsources 3 | 111 | minsources 3 |
@@ -130,6 +138,12 @@ in { | |||
130 | useNetworkd = true; | 138 | useNetworkd = true; |
131 | }; | 139 | }; |
132 | 140 | ||
141 | environment.etc."NetworkManager/dnsmasq.d/dnssec.conf" = { | ||
142 | text = '' | ||
143 | conf-file=${pkgs.dnsmasq}/share/dnsmasq/trust-anchors.conf | ||
144 | dnssec | ||
145 | ''; | ||
146 | }; | ||
133 | environment.etc."NetworkManager/dnsmasq.d/libvirt_dnsmasq.conf" = { | 147 | environment.etc."NetworkManager/dnsmasq.d/libvirt_dnsmasq.conf" = { |
134 | text = '' | 148 | text = '' |
135 | except-interface=virbr0 | 149 | except-interface=virbr0 |
@@ -372,19 +386,6 @@ in { | |||
372 | ]; | 386 | ]; |
373 | 387 | ||
374 | services = { | 388 | services = { |
375 | uucp = { | ||
376 | enable = true; | ||
377 | nodeName = "sif"; | ||
378 | remoteNodes = { | ||
379 | "ymir" = { | ||
380 | publicKeys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG6KNtsCOl5fsZ4rV7udTulGMphJweLBoKapzerWNoLY root@ymir"]; | ||
381 | hostnames = ["ymir.yggdrasil.li" "ymir.niflheim.yggdrasil"]; | ||
382 | }; | ||
383 | }; | ||
384 | |||
385 | defaultCommands = lib.mkForce []; | ||
386 | }; | ||
387 | |||
388 | avahi.enable = true; | 389 | avahi.enable = true; |
389 | 390 | ||
390 | fwupd.enable = true; | 391 | fwupd.enable = true; |
@@ -446,11 +447,6 @@ in { | |||
446 | 447 | ||
447 | systemd.tmpfiles.settings = { | 448 | systemd.tmpfiles.settings = { |
448 | "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime"; | 449 | "10-localtime"."/etc/localtime".L.argument = "/.bcachefs/etc/localtime"; |
449 | |||
450 | # "10-regreet"."/var/cache/regreet/cache.toml".C.argument = toString ((pkgs.formats.toml {}).generate "cache.toml" { | ||
451 | # last_user = "gkleen"; | ||
452 | # user_to_last_sess.gkleen = "Niri"; | ||
453 | # }); | ||
454 | }; | 450 | }; |
455 | 451 | ||
456 | users = { | 452 | users = { |
@@ -679,25 +675,15 @@ in { | |||
679 | "/var/lib/bluetooth" | 675 | "/var/lib/bluetooth" |
680 | "/var/lib/upower" | 676 | "/var/lib/upower" |
681 | "/var/lib/postfix" | 677 | "/var/lib/postfix" |
678 | "/var/lib/regreet" | ||
682 | "/etc/NetworkManager/system-connections" | 679 | "/etc/NetworkManager/system-connections" |
683 | { directory = "/var/uucp"; user = "uucp"; group = "uucp"; mode = "0700"; } | 680 | config.boot.lanzaboote.pkiBundle |
684 | { directory = "/var/spool/uucp"; user = "uucp"; group = "uucp"; mode = "0750"; } | ||
685 | ]; | 681 | ]; |
686 | files = [ | 682 | files = [ |
687 | ]; | 683 | ]; |
684 | timezone = true; | ||
688 | }; | 685 | }; |
689 | 686 | ||
690 | systemd.services.timezone = { | ||
691 | wantedBy = [ "multi-user.target" ]; | ||
692 | serviceConfig = { | ||
693 | Type = "oneshot"; | ||
694 | RemainAfterExit = true; | ||
695 | ExecStart = "${pkgs.coreutils}/bin/cp -vP /.bcachefs/etc/localtime /etc/localtime"; | ||
696 | ExecStop = "${pkgs.coreutils}/bin/cp -vP /etc/localtime /.bcachefs/etc/localtime"; | ||
697 | }; | ||
698 | }; | ||
699 | services.tzupdate.enable = true; | ||
700 | |||
701 | security.pam.services.gtklock = {}; | 687 | security.pam.services.gtklock = {}; |
702 | 688 | ||
703 | home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ]; | 689 | home-manager.sharedModules = [ flakeInputs.nixVirt.homeModules.default ]; |