chore: replace impermanence with preservation (#201)

This commit is contained in:
Ryan Yin
2025-06-29 15:08:12 +08:00
committed by GitHub
parent 0004bccc9d
commit ffee47a2de
14 changed files with 14 additions and 86 deletions

View File

@@ -90,7 +90,7 @@
device = "/dev/disk/by-uuid/2f4db246-e65d-4808-8ab4-5365f9dea1ef";
fsType = "btrfs";
options = ["subvol=@persistent" "noatime" "compress-force=zstd:1"];
# impermanence's data is required for booting.
# preservation's data is required for booting.
neededForBoot = true;
};

View File

@@ -96,7 +96,7 @@
device = "/dev/disk/by-uuid/1167076c-dee1-486c-83c1-4b1af37555cd";
fsType = "btrfs";
options = ["subvol=@persistent" "compress-force=zstd:1"];
# impermanence's data is required for booting.
# preservation's data is required for booting.
neededForBoot = true;
};

View File

@@ -31,7 +31,7 @@ in {
#
# See also https://grahamc.com/blog/erase-your-darlings/
# NOTE: impermanence only mounts the directory/file list below to /persistent
# NOTE: preservation only mounts the directory/file list below to /persistent
# If the directory/file already exists in the root filesystem you should
# move those files/directories to /persistent first!
preservation.preserveAt."/persistent" = {

View File

@@ -60,7 +60,7 @@ nixos-enter
# NOTE: DO NOT skip this step!!!
# copy the essential files into /persistent
# otherwise the / will be cleared and data will lost
## NOTE: impermanence just create links from / to /persistent
## NOTE: preservation just create links from / to /persistent
## We need to copy files into /persistent manually!!!
mv /etc/machine-id /persistent/etc/
mv /etc/ssh /persistent/etc/

View File

@@ -1,5 +1,5 @@
{
# required by impermanence
# required by preservation
fileSystems."/persistent".neededForBoot = true;
# contains the k3s's token