diff --git a/nodes/hosts/lappy/disk-config.nix b/nodes/hosts/lappy/disk-config.nix index 11dc003..f083241 100644 --- a/nodes/hosts/lappy/disk-config.nix +++ b/nodes/hosts/lappy/disk-config.nix @@ -48,6 +48,21 @@ "noatime" ]; }; + "/root-blank" = { + mountOptions = [ + "subvol=root-blank" + "nodatacow" + "noatime" + ]; + }; + "/home" = { + mountpoint = "/home"; + mountOptions = [ + "subvol=home" + "compress=zstd" + "noatime" + ]; + }; "/nix" = { mountpoint = "/nix"; mountOptions = [ @@ -72,6 +87,24 @@ "noatime" ]; }; + "/lib" = { + mountpoint = "/var/lib"; + mountOptions = [ + "subvol=lib" + "compress=zstd" + "noatime" + ]; + }; + "/persist/swap" = { + mountpoint = "/persist/swap"; + mountOptions = [ + "subvol=swap" + "noatime" + "nodatacow" + "compress=no" + ]; + swap.swapfile.size = "18G"; + }; }; }; }; @@ -81,6 +114,7 @@ }; }; }; - fileSystems."/nix/persist".neededForBoot = true; + fileSystems."/persist".neededForBoot = true; fileSystems."/var/log".neededForBoot = true; + fileSystems."/var/lib".neededForBoot = true; } diff --git a/nodes/hosts/lappy/system/filesystems.nix b/nodes/hosts/lappy/system/filesystems.nix index a3cb6e3..06b7f69 100644 --- a/nodes/hosts/lappy/system/filesystems.nix +++ b/nodes/hosts/lappy/system/filesystems.nix @@ -6,6 +6,12 @@ options = [ "subvol=root" "compress=zstd" "noatime" ]; }; + fileSystems."/home" = + { device = "/dev/mapper/cryptroot"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" "noatime" ]; + }; + fileSystems."/nix" = { device = "/dev/mapper/cryptroot"; fsType = "btrfs"; @@ -19,7 +25,14 @@ neededForBoot = true; }; - fileSystems."/nix/persist" = + fileSystems."/var/lib" = + { device = "/dev/mapper/cryptroot"; + fsType = "btrfs"; + options = [ "subvol=lib" "compress=zstd" "noatime" ]; + neededForBoot = true; + }; + + fileSystems."/persist" = { device = "/dev/mapper/cryptroot"; fsType = "btrfs"; options = [ "subvol=persist" "compress=zstd" "noatime" ]; @@ -32,9 +45,15 @@ options = [ "fmask=0077" "dmask=0077" ]; }; + fileSystems."/persist/swap" = + { device = "/dev/mapper/cryptroot"; + fsType = "btrfs"; + options = [ "subvol=swap" "noatime" "nodatacow" "compress=no" ]; + }; + swapDevices = [{ - device = "/swapfile"; - size = 16 * 1024; + device = "/persist/swap/swapfile"; + size = 18 * 1024; }]; }