Add impermanence setup to SIIT-DC

This commit is contained in:
Vili Sinervä 2025-06-29 12:39:15 +03:00
parent 9c4a0ea9b5
commit bfd56dd547
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
3 changed files with 96 additions and 1 deletions

View file

@ -0,0 +1,15 @@
{ lib, ... }:
{
services.zfs = {
autoScrub.enable = true;
autoSnapshot = {
enable = true;
flags = "-k -p --utc";
};
};
boot.initrd.postResumeCommands = lib.mkAfter ''
zfs rollback -r zroot/root@blank
zfs rollback -r zroot/home@blank
'';
}