Fix rolling back to blank root snapshot on servers

This commit is contained in:
Charlotte Van Petegem 2020-12-11 10:24:07 +01:00
parent e086653694
commit 5ff8902446
No known key found for this signature in database
GPG key ID: 019E764B7184435A
5 changed files with 8 additions and 1 deletions

View file

@ -33,6 +33,7 @@
location = "lasting-integrity";
}
];
rootDataset = "rpool/local/root";
};
};
}

View file

@ -33,6 +33,7 @@
location = "lasting-integrity";
}
];
rootDataset = "rpool/local/root";
};
};
}

View file

@ -29,6 +29,7 @@
fast = true;
location = "192.168.0.1";
}];
rootDataset = "zroot/local/root";
};
};
}

View file

@ -36,6 +36,7 @@
location = "192.168.0.2";
}
];
rootDataset = "zroot/local/root";
};
};
}

View file

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