summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/sif/default.nix16
-rw-r--r--hosts/sif/hw.nix76
2 files changed, 53 insertions, 39 deletions
diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix
index 87c0f3bf..96cd66cc 100644
--- a/hosts/sif/default.nix
+++ b/hosts/sif/default.nix
@@ -31,7 +31,7 @@ in {
31 boot = { 31 boot = {
32 initrd = { 32 initrd = {
33 systemd = { 33 systemd = {
34 enable = true; 34 enable = false;
35 emergencyAccess = config.users.users.root.hashedPassword; 35 emergencyAccess = config.users.users.root.hashedPassword;
36 }; 36 };
37 luks.devices = { 37 luks.devices = {
@@ -423,6 +423,17 @@ in {
423 }; 423 };
424 }; 424 };
425 425
426 systemd.tmpfiles.rules = [
427 "d /var/lib/lightdm/.cache/lightdm-gtk-greeter 1770 lightdm lightdm -"
428 "L /var/lib/lightdm/.cache/lightdm-gtk-greeter/state - - - - ${pkgs.writeText "state" ''
429 [greeter]
430 last-user=gkleen
431 last-session=none+xmonad
432 ''}"
433
434 "L /etc/localtime - - - - /.bcachefs/etc/localtime"
435 ];
436
426 users = { 437 users = {
427 users.gkleen.extraGroups = [ "media" "plugdev" "input" "rtkit" ]; 438 users.gkleen.extraGroups = [ "media" "plugdev" "input" "rtkit" ];
428 groups.media = {}; 439 groups.media = {};
@@ -444,6 +455,7 @@ in {
444 "log.level" = 2; 455 "log.level" = 2;
445 "core.daemon" = true; 456 "core.daemon" = true;
446 "core.name" = "pipewire-0"; 457 "core.name" = "pipewire-0";
458 "module.x11.bell" = false;
447 }; 459 };
448 "context.modules" = [ 460 "context.modules" = [
449 { 461 {
@@ -623,7 +635,7 @@ in {
623 zramSwap = { 635 zramSwap = {
624 enable = true; 636 enable = true;
625 algorithm = "zstd"; 637 algorithm = "zstd";
626 writebackDevice = "/dev/disk/by-uuid/50f3f856-cc17-4614-846a-34a14d5006ec"; 638 writebackDevice = "/dev/disk/by-label/swap";
627 }; 639 };
628 640
629 services.pcscd.enable = true; 641 services.pcscd.enable = true;
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