mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
chore: add separate /state directory for reboot-persistent non-backuped state
This commit is contained in:
parent
ba1932d2ef
commit
b0e9978ead
3 changed files with 54 additions and 44 deletions
|
@ -33,6 +33,7 @@
|
|||
postCreateHook = "zfs snapshot rpool/local/root@blank";
|
||||
};
|
||||
"local/nix" = filesystem "/nix";
|
||||
"local/state" = filesystem "/state";
|
||||
"safe" = unmountable;
|
||||
"safe/persist" = filesystem "/persist";
|
||||
"safe/vms" = unmountable;
|
||||
|
@ -41,6 +42,9 @@
|
|||
};
|
||||
};
|
||||
|
||||
# TODO remove once this is upstreamed
|
||||
boot.initrd.systemd.services."zfs-import-rpool".after = ["cryptsetup.target"];
|
||||
fileSystems."/state".neededForBoot = true;
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
|
||||
# After importing the rpool, rollback the root system to be empty.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue