Auto rollback zfs on boot
This commit is contained in:
parent
b879f6e197
commit
5074472017
|
@ -8,20 +8,18 @@ in
|
||||||
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
boot.kernelParams = [ "nohibernate" ];
|
boot.kernelParams = [ "nohibernate" ];
|
||||||
|
|
||||||
boot.initrd.systemd.services = {
|
# {{{ Rollback
|
||||||
# # {{{ Rollback
|
boot.initrd.systemd.services.rollback = {
|
||||||
# rollback = {
|
path = [ pkgs.zfs ];
|
||||||
# path = [ pkgs.zfs ];
|
serviceConfig = {
|
||||||
# serviceConfig = {
|
Type = "oneshot";
|
||||||
# Type = "oneshot";
|
RemainAfterExit = true;
|
||||||
# RemainAfterExit = true;
|
|
||||||
# };
|
|
||||||
# unitConfig.DefaultDependencies = "no";
|
|
||||||
# wantedBy = [ "initrd.target" ];
|
|
||||||
# after = [ "zfs-import.target" ];
|
|
||||||
# before = [ "sysroot.mount" ];
|
|
||||||
# script = "zfs rollback -r zroot@blank";
|
|
||||||
# };
|
|
||||||
# # }}}
|
|
||||||
};
|
};
|
||||||
|
unitConfig.DefaultDependencies = "no";
|
||||||
|
wantedBy = [ "initrd.target" ];
|
||||||
|
after = [ "zfs-import.target" ];
|
||||||
|
before = [ "sysroot.mount" ];
|
||||||
|
script = "zfs rollback -r zroot@blank";
|
||||||
|
};
|
||||||
|
# }}}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue