summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/sif/default.nix2
-rw-r--r--hosts/sif/hw.nix50
2 files changed, 37 insertions, 15 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix
index f02c77cf..87c0f3bf 100644
--- a/hosts/sif/default.nix
+++ b/hosts/sif/default.nix
@@ -380,7 +380,7 @@ in {
380 xkbOptions = "compose:caps"; 380 xkbOptions = "compose:caps";
381 381
382 displayManager.lightdm = { 382 displayManager.lightdm = {
383 enable = false; 383 enable = true;
384 greeters.gtk = { 384 greeters.gtk = {
385 clock-format = "%H:%M %a %b %_d"; 385 clock-format = "%H:%M %a %b %_d";
386 indicators = ["~host" "~spacer" "~clock" "~session" "~power"]; 386 indicators = ["~host" "~spacer" "~clock" "~session" "~power"];
diff --git a/hosts/sif/hw.nix b/hosts/sif/hw.nix
index f3b20580..a2991def 100644
--- a/hosts/sif/hw.nix
+++ b/hosts/sif/hw.nix
@@ -5,17 +5,17 @@
5 "/boot" = 5 "/boot" =
6 { label = "boot"; 6 { label = "boot";
7 fsType = "vfat"; 7 fsType = "vfat";
8 options = [ "fmask=0022" "dmask=0022" ]; 8 options = [ "fmask=0033" "dmask=0022" ];
9 };
10 "/.bcachefs" =
11 { device = "/dev/mapper/sif-nvm0:/dev/mapper/sif-nvm1";
12 fsType = "bcachefs";
13 neededForBoot = true;
14 }; 9 };
10 # "/.bcachefs" =
11 # { device = "/dev/mapper/sif-nvm0:/dev/mapper/sif-nvm1";
12 # fsType = "bcachefs";
13 # neededForBoot = true;
14 # };
15 "/nix" = 15 "/nix" =
16 { device = "/.bcachefs/nix"; 16 { device = "/.bcachefs/nix";
17 fsType = "none"; 17 fsType = "none";
18 options = [ "bind" ]; 18 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ];
19 }; 19 };
20 "/root" = 20 "/root" =
21 { device = "/.bcachefs/root"; 21 { device = "/.bcachefs/root";
@@ -25,29 +25,33 @@
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" ]; 28 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ];
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" ]; 33 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ];
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" ]; 39 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ];
40 neededForBoot = true;
41 }; 40 };
42 "/var/lib/chrony" = 41 "/var/lib/chrony" =
43 { device = "/.bcachefs/var/lib/chrony"; 42 { device = "/.bcachefs/var/lib/chrony";
44 fsType = "none"; 43 fsType = "none";
45 options = [ "bind" ]; 44 options = [ "bind" ];
46 }; 45 };
46 "/var/lib/fprint" =
47 { device = "/.bcachefs/var/lib/fprint";
48 fsType = "none";
49 options = [ "bind" ];
50 };
47 "/var/lib/systemd" = 51 "/var/lib/systemd" =
48 { device = "/.bcachefs/var/lib/systemd"; 52 { device = "/.bcachefs/var/lib/systemd";
49 fsType = "none"; 53 fsType = "none";
50 options = [ "bind" ]; 54 options = [ "bind" "x-systemd.after=bcachefs.service" "x-systemd.requires=bcachefs.service" ];
51 neededForBoot = true; 55 neededForBoot = true;
52 }; 56 };
53 "/home" = 57 "/home" =
@@ -61,7 +65,25 @@
61 options = [ "bind" ]; 65 options = [ "bind" ];
62 }; 66 };
63 }; 67 };
64 boot.initrd.systemd.services."unlock-bcachefs-${utils.escapeSystemdPath "/.bcachefs"}".enable = false; 68
69 boot.initrd.supportedFilesystems.bcachefs = true;
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;
72 boot.initrd.systemd.services."bcachefs" = {
73 before = [ "initrd-fs.target" ];
74 after = [ "local-fs-pre.target" "dev-sif-nvm0.device" "dev-sif-nvm1.device" ];
75 requires = [ "dev-sif-nvm0.device" "dev-sif-nvm1.device" ];
76 wantedBy = [ "initrd-fs.target" ];
77 unitConfig = {
78 DefaultDependencies = false;
79 StopPropagatedFrom = [ "dev-sif-nvm0.device" "dev-sif-nvm1.device" ];
80 };
81 serviceConfig = {
82 Type = "oneshot";
83 ExecStart = "/bin/mount -o X-mount.mkdir -t bcachefs /dev/sif/nvm0:/dev/sif/nvm1 /sysroot/.bcachefs";
84 RemainAfterExit = true;
85 };
86 };
65 87
66 swapDevices = [ 88 swapDevices = [
67 { label = "swap"; } 89 { label = "swap"; }
@@ -72,6 +94,6 @@
72 console.font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; 94 console.font = "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
73 95
74 hardware.cpu.intel.updateMicrocode = true; 96 hardware.cpu.intel.updateMicrocode = true;
75 97
76 hardware.enableRedistributableFirmware = true; 98 hardware.enableRedistributableFirmware = true;
77} 99}