nixos-conf/shared/hardware/impermanence.nix

15 lines
280 B
Nix

{ 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
'';
}