maralorn
3f9501f939
All checks were successful
Nix build / nix-build (nixosConfigurations.apollo.config.system.build.toplevel) (push) Successful in 1m15s
Nix build / nix-build (nixosConfigurations.athene.config.system.build.toplevel) (push) Successful in 58s
Nix build / nix-build (nixosConfigurations.hephaistos.config.system.build.toplevel) (push) Successful in 1m14s
Nix build / nix-build (nixosConfigurations.hera.config.system.build.toplevel) (push) Successful in 50s
Nix build / nix-build (nixosConfigurations.zeus.config.system.build.toplevel) (push) Successful in 50s
Nix build / nix-flake-check (push) Successful in 1m27s
27 lines
632 B
Nix
27 lines
632 B
Nix
{ pkgs, ... }:
|
|
let
|
|
script = pkgs.writers.writeHaskell "rollback" {
|
|
libraries = builtins.attrValues pkgs.myHaskellScriptPackages;
|
|
} (builtins.readFile ./sysroot-rollback.hs);
|
|
in
|
|
{
|
|
|
|
boot.initrd.systemd = {
|
|
storePaths = [ script ];
|
|
services.rollback = {
|
|
description = "Rollback File System Root";
|
|
wantedBy = [ "basic.target" ];
|
|
before = [
|
|
"initrd-root-fs.target"
|
|
"sysroot-var-lib-nixos.mount"
|
|
];
|
|
after = [ "sysroot.mount" ];
|
|
unitConfig.DefaultDependencies = "no";
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
ExecStart = script;
|
|
};
|
|
};
|
|
};
|
|
}
|