mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 08:28:27 +02:00
chore: replace impermanence with preservation (#201)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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" = {
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
# required by impermanence
|
||||
# required by preservation
|
||||
fileSystems."/persistent".neededForBoot = true;
|
||||
|
||||
# contains the k3s's token
|
||||
|
||||
Reference in New Issue
Block a user