summaryrefslogtreecommitdiff
path: root/hosts/sif/hw.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/sif/hw.nix')
-rw-r--r--hosts/sif/hw.nix76
1 files changed, 39 insertions, 37 deletions
diff --git a/hosts/sif/hw.nix b/hosts/sif/hw.nix
index a2991def..d01582e0 100644
--- a/hosts/sif/hw.nix
+++ b/hosts/sif/hw.nix
@@ -7,87 +7,89 @@
7 fsType = "vfat"; 7 fsType = "vfat";
8 options = [ "fmask=0033" "dmask=0022" ]; 8 options = [ "fmask=0033" "dmask=0022" ];
9 }; 9 };
10 # "/.bcachefs" = 10 "/.bcachefs" =
11 # { device = "/dev/mapper/sif-nvm0:/dev/mapper/sif-nvm1"; 11 { device = "/dev/mapper/sif-nvm0:/dev/mapper/sif-nvm1";
12 # fsType = "bcachefs"; 12 fsType = "bcachefs";
13 # neededForBoot = true; 13 neededForBoot = true;
14 # }; 14 };
15 "/nix" = 15 "/nix" =
16 { device = "/.bcachefs/nix"; 16 { device = "/.bcachefs/nix";
17 fsType = "none"; 17 fsType = "none";
18 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; 18 options = [ "bind" ]; # "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ];
19 }; 19 };
20 "/root" = 20 "/root" =
21 { device = "/.bcachefs/root"; 21 { device = "/.bcachefs/root";
22 fsType = "none"; 22 fsType = "none";
23 options = [ "bind" ]; 23 options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ];
24 }; 24 };
25 "/var/log" = 25 "/var/log" =
26 { device = "/.bcachefs/var/log"; 26 { device = "/.bcachefs/var/log";
27 fsType = "none"; 27 fsType = "none";
28 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; 28 options = [ "bind" ]; # "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ];
29 }; 29 };
30 "/var/lib/sops-nix" = 30 "/var/lib/sops-nix" =
31 { device = "/.bcachefs/var/lib/sops-nix"; 31 { device = "/.bcachefs/var/lib/sops-nix";
32 fsType = "none"; 32 fsType = "none";
33 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; 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; 34 neededForBoot = true;
35 }; 35 };
36 "/var/lib/nixos" = 36 "/var/lib/nixos" =
37 { device = "/.bcachefs/var/lib/nixos"; 37 { device = "/.bcachefs/var/lib/nixos";
38 fsType = "none"; 38 fsType = "none";
39 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; 39 options = [ "bind" ]; # "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ];
40 }; 40 };
41 "/var/lib/chrony" = 41 "/var/lib/chrony" =
42 { device = "/.bcachefs/var/lib/chrony"; 42 { device = "/.bcachefs/var/lib/chrony";
43 fsType = "none"; 43 fsType = "none";
44 options = [ "bind" ]; 44 options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ];
45 }; 45 };
46 "/var/lib/fprint" = 46 "/var/lib/fprint" =
47 { device = "/.bcachefs/var/lib/fprint"; 47 { device = "/.bcachefs/var/lib/fprint";
48 fsType = "none"; 48 fsType = "none";
49 options = [ "bind" ]; 49 options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ];
50 }; 50 };
51 "/var/lib/systemd" = 51 "/var/lib/systemd" =
52 { device = "/.bcachefs/var/lib/systemd"; 52 { device = "/.bcachefs/var/lib/systemd";
53 fsType = "none"; 53 fsType = "none";
54 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ]; 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; 55 neededForBoot = true;
56 }; 56 };
57 "/home" = 57 "/home" =
58 { device = "/.bcachefs/home"; 58 { device = "/.bcachefs/home";
59 fsType = "none"; 59 fsType = "none";
60 options = [ "bind" ]; 60 options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ];
61 }; 61 };
62 "/etc/NetworkManager/system-connections" = 62 "/etc/NetworkManager/system-connections" =
63 { device = "/.bcachefs/etc/NetworkManager/system-connections"; 63 { device = "/.bcachefs/etc/NetworkManager/system-connections";
64 fsType = "none"; 64 fsType = "none";
65 options = [ "bind" ]; 65 options = [ "bind" ]; # "x-systemd.after=\\x2ebcachefs.mount" "x-systemd.requires=\\x2ebcachefs.mount" ];
66 }; 66 };
67 }; 67 };
68 68
69 boot.initrd.supportedFilesystems.bcachefs = true; 69 # boot.initrd.supportedFilesystems.bcachefs = true;
70 boot.initrd.systemd.units."dev-sif-nvm0:-dev-sif-nvm1.device".enable = false; 70 # boot.initrd.systemd.units."dev-sif-nvm0:-dev-sif-nvm1.device".enable = false;
71 systemd.units."dev-sif-nvm0:-dev-sif-nvm1.device".enable = false; 71 # systemd.units."dev-sif-nvm0:-dev-sif-nvm1.device".enable = false;
72 boot.initrd.systemd.services."bcachefs" = { 72 # boot.initrd.systemd.services."bcachefs" = {
73 before = [ "initrd-fs.target" ]; 73 # before = [ "initrd-fs.target" ];
74 after = [ "local-fs-pre.target" "dev-sif-nvm0.device" "dev-sif-nvm1.device" ]; 74 # after = [ "local-fs-pre.target" "dev-sif-nvm0.device" "dev-sif-nvm1.device" ];
75 requires = [ "dev-sif-nvm0.device" "dev-sif-nvm1.device" ]; 75 # requires = [ "dev-sif-nvm0.device" "dev-sif-nvm1.device" ];
76 wantedBy = [ "initrd-fs.target" ]; 76 # wantedBy = [ "initrd-fs.target" ];
77 unitConfig = { 77 # unitConfig = {
78 DefaultDependencies = false; 78 # DefaultDependencies = false;
79 StopPropagatedFrom = [ "dev-sif-nvm0.device" "dev-sif-nvm1.device" ]; 79 # StopPropagatedFrom = [ "dev-sif-nvm0.device" "dev-sif-nvm1.device" ];
80 }; 80 # };
81 serviceConfig = { 81 # serviceConfig = {
82 Type = "oneshot"; 82 # Type = "oneshot";
83 ExecStart = "/bin/mount -o X-mount.mkdir -t bcachefs /dev/sif/nvm0:/dev/sif/nvm1 /sysroot/.bcachefs"; 83 # ExecStart = "/bin/mount -o X-mount.mkdir -t bcachefs /dev/sif/nvm0:/dev/sif/nvm1 /sysroot/.bcachefs";
84 RemainAfterExit = true; 84 # RemainAfterExit = true;
85 }; 85 # };
86 }; 86 # };
87 87 # systemd.services."bcachefs" = {
88 swapDevices = [ 88 # serviceConfig = {
89 { label = "swap"; } 89 # Type = "oneshot";
90 ]; 90 # ExecStart = "${pkgs.coreutils}/bin/true";
91 # };
92 # };
91 93
92 nix.settings.max-jobs = 12; 94 nix.settings.max-jobs = 12;
93 # High-DPI console 95 # High-DPI console