From 764485f19aad0845a4598ba8db570a83c8c7188e Mon Sep 17 00:00:00 2001 From: Roy Dumblauskas Date: Tue, 16 Jun 2026 22:43:16 -0500 Subject: [PATCH] rollback script --- configuration.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/configuration.nix b/configuration.nix index 7d1629c..32cfd83 100755 --- a/configuration.nix +++ b/configuration.nix @@ -128,6 +128,7 @@ }; boot.zfs.forceImportRoot = false; + # Delete root on reboot disable for now while broken boot.initrd.systemd.services = { rollback = { @@ -135,14 +136,14 @@ wantedBy = [ "initrd.target" ]; before = [ "sysroot.mount" ]; after = [ "zfs-import-zroot.service" ]; + path = with pkgs; [ zfs ]; - serviceConfig = { - Type = "oneshot"; - ExecStart = pkgs.writeShellScript "delete-root" '' - ${pkgs.zfs}/bin/zfs rollback -r zroot/root@blank - echo "blank rollback complete" - ''; - }; + unitConfig.DefaultDependencies = "no"; + serviceConfig.Type = "oneshot"; + + script = '' + zfs rollback -r zroot/root@blank && echo "blank rollback complete" | tee /dev/kmsg + ''; }; };