Setup lappy for proper impermanance.

This commit is contained in:
jay
2025-07-07 00:29:09 +00:00
parent 1c70228703
commit ca885f29f2
2 changed files with 57 additions and 4 deletions

View File

@@ -48,6 +48,21 @@
"noatime" "noatime"
]; ];
}; };
"/root-blank" = {
mountOptions = [
"subvol=root-blank"
"nodatacow"
"noatime"
];
};
"/home" = {
mountpoint = "/home";
mountOptions = [
"subvol=home"
"compress=zstd"
"noatime"
];
};
"/nix" = { "/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = [ mountOptions = [
@@ -72,6 +87,23 @@
"noatime" "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 +113,8 @@
}; };
}; };
}; };
fileSystems."/nix/persist".neededForBoot = true; };
fileSystems."/persist".neededForBoot = true;
fileSystems."/var/log".neededForBoot = true; fileSystems."/var/log".neededForBoot = true;
fileSystems."/var/lib".neededForBoot = true;
} }

View File

@@ -6,6 +6,12 @@
options = [ "subvol=root" "compress=zstd" "noatime" ]; options = [ "subvol=root" "compress=zstd" "noatime" ];
}; };
fileSystems."/home" =
{ device = "/dev/mapper/cryptroot";
fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ];
};
fileSystems."/nix" = fileSystems."/nix" =
{ device = "/dev/mapper/cryptroot"; { device = "/dev/mapper/cryptroot";
fsType = "btrfs"; fsType = "btrfs";
@@ -19,7 +25,14 @@
neededForBoot = true; 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"; { device = "/dev/mapper/cryptroot";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=persist" "compress=zstd" "noatime" ]; options = [ "subvol=persist" "compress=zstd" "noatime" ];
@@ -32,9 +45,15 @@
options = [ "fmask=0077" "dmask=0077" ]; options = [ "fmask=0077" "dmask=0077" ];
}; };
fileSystems."/persist/swap" =
{ device = "/dev/mapper/cryptroot";
fsType = "btrfs";
options = [ "subvol=swap" "noatime" "nodatacow" "compress=no" ];
};
swapDevices = [{ swapDevices = [{
device = "/swapfile"; device = "/persist/swap/swapfile";
size = 16 * 1024; size = 18 * 1024;
}]; }];
} }