feat: added activation and resume scripts to storage and impermanence

This commit is contained in:
Leyla Becker 2025-11-08 21:10:18 -06:00
parent 1310b50794
commit 4da5d65d8f
2 changed files with 31 additions and 15 deletions

View file

@ -50,6 +50,23 @@
};
})
(lib.mkIf config.storage.impermanence.enable {
boot.initrd.postResumeCommands = lib.mkAfter ''
zfs rollback -r rpool/local/system/root@blank
'';
storage.zfs.datasets = {
"local/system/root" = {
type = "zfs_fs";
mount = {
enable = true;
mountPoint = "/";
};
snapshot = {
blankSnapshot = true;
};
};
};
storage.impermanence.datasets = {
"persist/system/root" = {
mount = {
@ -65,18 +82,6 @@
};
};
};
storage.zfs.datasets = {
"local/system/root" = {
type = "zfs_fs";
mount = {
enable = true;
mountPoint = "/";
};
snapshot = {
blankSnapshot = true;
};
};
};
# TODO: home-manager.users.<user>.storage.impermanence.enable
# is false then persist the entire directory of the user