Fix rolling back to blank root snapshot on servers
This commit is contained in:
parent
e086653694
commit
5ff8902446
5 changed files with 8 additions and 1 deletions
|
@ -40,6 +40,9 @@ in
|
|||
location = "lasting-integrity.vanpetegem.me";
|
||||
}];
|
||||
};
|
||||
rootDataset = lib.mkOption {
|
||||
example = "rpool/local/root";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.zfs.enable {
|
||||
|
@ -50,7 +53,7 @@ in
|
|||
supportedFilesystems = [ "zfs" ];
|
||||
zfs.requestEncryptionCredentials = config.chvp.zfs.encrypted;
|
||||
initrd.postDeviceCommands = lib.mkAfter ''
|
||||
zfs rollback -r rpool/local/root@blank
|
||||
zfs rollback -r ${config.chvp.zfs.rootDataset}@blank
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue