diff options
Diffstat (limited to 'hosts/sif')
-rw-r--r-- | hosts/sif/default.nix | 31 | ||||
-rw-r--r-- | hosts/sif/hw.nix | 57 |
2 files changed, 34 insertions, 54 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 3525015d..5ed4e05e 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix | |||
@@ -16,6 +16,7 @@ in { | |||
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 |
17 | networkmanager | 17 | networkmanager |
18 | flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 | 18 | flakeInputs.nixos-hardware.nixosModules.lenovo-thinkpad-p1 |
19 | flakeInputs.impermanence.nixosModules.impermanence | ||
19 | ]; | 20 | ]; |
20 | 21 | ||
21 | config = { | 22 | config = { |
@@ -555,7 +556,10 @@ in { | |||
555 | # sound.enable = true; | 556 | # sound.enable = true; |
556 | 557 | ||
557 | nix = { | 558 | nix = { |
558 | settings.auto-optimise-store = true; | 559 | settings = { |
560 | auto-optimise-store = true; | ||
561 | max-jobs = 4; | ||
562 | }; | ||
559 | daemonCPUSchedPolicy = "idle"; | 563 | daemonCPUSchedPolicy = "idle"; |
560 | daemonIOSchedClass = "idle"; | 564 | daemonIOSchedClass = "idle"; |
561 | 565 | ||
@@ -569,6 +573,11 @@ in { | |||
569 | speedFactor = 4; | 573 | speedFactor = 4; |
570 | }; | 574 | }; |
571 | }; | 575 | }; |
576 | systemd.services."nix-daemon" = { | ||
577 | serviceConfig = { | ||
578 | CPUQuota = "400%"; | ||
579 | }; | ||
580 | }; | ||
572 | 581 | ||
573 | environment.etc."X11/xorg.conf.d/50-wacom.conf".source = lib.mkForce ./wacom.conf; | 582 | environment.etc."X11/xorg.conf.d/50-wacom.conf".source = lib.mkForce ./wacom.conf; |
574 | 583 | ||
@@ -661,6 +670,26 @@ in { | |||
661 | in [ gtk-portal ]; | 670 | in [ gtk-portal ]; |
662 | }; | 671 | }; |
663 | 672 | ||
673 | environment.persistence."/.bcachefs" = { | ||
674 | hideMounts = true; | ||
675 | directories = [ | ||
676 | "/nix" | ||
677 | "/root" | ||
678 | "/var/log" | ||
679 | "/var/lib/sops-nix" | ||
680 | "/var/lib/nixos" | ||
681 | "/var/lib/systemd" | ||
682 | "/home" | ||
683 | "/var/lib/chrony" | ||
684 | "/var/lib/fprint" | ||
685 | "/var/lib/bluetooth" | ||
686 | "/etc/NetworkManager/system-connections" | ||
687 | ]; | ||
688 | files = [ | ||
689 | "/etc/localtime" | ||
690 | ]; | ||
691 | }; | ||
692 | |||
664 | system.stateVersion = "24.11"; | 693 | system.stateVersion = "24.11"; |
665 | }; | 694 | }; |
666 | } | 695 | } |
diff --git a/hosts/sif/hw.nix b/hosts/sif/hw.nix index 077d25a6..fc20ef7c 100644 --- a/hosts/sif/hw.nix +++ b/hosts/sif/hw.nix | |||
@@ -12,59 +12,11 @@ | |||
12 | fsType = "bcachefs"; | 12 | fsType = "bcachefs"; |
13 | neededForBoot = true; | 13 | neededForBoot = true; |
14 | }; | 14 | }; |
15 | "/nix" = | 15 | "/var/lib/sops-nix".neededForBoot = true; |
16 | { device = "/.bcachefs/nix"; | 16 | "/var/lib/systemd".neededForBoot = true; |
17 | fsType = "none"; | ||
18 | options = [ "bind" ]; # "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
19 | }; | ||
20 | "/root" = | ||
21 | { device = "/.bcachefs/root"; | ||
22 | fsType = "none"; | ||
23 | options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
24 | }; | ||
25 | "/var/log" = | ||
26 | { device = "/.bcachefs/var/log"; | ||
27 | fsType = "none"; | ||
28 | options = [ "bind" ]; # "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
29 | }; | ||
30 | "/var/lib/sops-nix" = | ||
31 | { device = "/.bcachefs/var/lib/sops-nix"; | ||
32 | fsType = "none"; | ||
33 | options = [ "bind" ]; # "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
34 | neededForBoot = true; | ||
35 | }; | ||
36 | "/var/lib/nixos" = | ||
37 | { device = "/.bcachefs/var/lib/nixos"; | ||
38 | fsType = "none"; | ||
39 | options = [ "bind" ]; # "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
40 | }; | ||
41 | "/var/lib/chrony" = | ||
42 | { device = "/.bcachefs/var/lib/chrony"; | ||
43 | fsType = "none"; | ||
44 | options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
45 | }; | ||
46 | "/var/lib/fprint" = | ||
47 | { device = "/.bcachefs/var/lib/fprint"; | ||
48 | fsType = "none"; | ||
49 | options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
50 | }; | ||
51 | "/var/lib/systemd" = | ||
52 | { device = "/.bcachefs/var/lib/systemd"; | ||
53 | fsType = "none"; | ||
54 | options = [ "bind" ]; # "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
55 | neededForBoot = true; | ||
56 | }; | ||
57 | "/home" = | ||
58 | { device = "/.bcachefs/home"; | ||
59 | fsType = "none"; | ||
60 | options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
61 | }; | ||
62 | "/etc/NetworkManager/system-connections" = | ||
63 | { device = "/.bcachefs/etc/NetworkManager/system-connections"; | ||
64 | fsType = "none"; | ||
65 | options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ]; | ||
66 | }; | ||
67 | }; | 17 | }; |
18 | system.etc.overlay.enable = false; | ||
19 | systemd.sysusers.enable = false; | ||
68 | 20 | ||
69 | # boot.initrd.supportedFilesystems.bcachefs = true; | 21 | # boot.initrd.supportedFilesystems.bcachefs = true; |
70 | # boot.initrd.systemd.units."dev-sif-nvm0:-dev-sif-nvm1.device".enable = false; | 22 | # boot.initrd.systemd.units."dev-sif-nvm0:-dev-sif-nvm1.device".enable = false; |
@@ -91,7 +43,6 @@ | |||
91 | # }; | 43 | # }; |
92 | # }; | 44 | # }; |
93 | 45 | ||
94 | nix.settings.max-jobs = 12; | ||
95 | # High-DPI console | 46 | # High-DPI console |
96 | console.font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; | 47 | console.font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; |
97 | 48 | ||