This commit is contained in:
2026-06-09 23:39:59 -05:00
parent 00dcce0038
commit 1384fccf88
3 changed files with 20 additions and 6 deletions
+19 -4
View File
@@ -126,9 +126,25 @@
};
# Delete root on reboot
boot.initrd.postMountCommands = lib.mkAfter ''
zfs rollback -r zroot/root@blank
'';
boot.initrd.systemd.services = {
rollback = {
description = "Rollback root zfs dataset to blank snapshot";
wantedBy = [ "initrd.target" ];
before = [ "sysroot.mount" ];
after = [ "zfs-import-zroot.service" ];
path = with pkgs; [
zfs
];
serviceConfig = {
Type = "oneshot";
ExecStart = ''
zfs rollback -r zroot/root@blank && echo "blank rollback complete"
'';
};
};
};
nix = {
settings.experimental-features = [
@@ -150,7 +166,6 @@
environment.systemPackages = with pkgs; [
alacritty
gimp
neofetch
rose-pine-hyprcursor
vim
wget