Fix impermanence wipe path issue

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-08-16 20:03:48 +02:00
parent 27cac97691
commit 103bf021c4
5 changed files with 41 additions and 42 deletions

View File

@@ -2,29 +2,26 @@
{
imports = [ ./options.nix ];
boot.initrd.systemd =
let
bins = with pkgs; [
coreutils
util-linux
findutils
btrfs-progs
];
in
{
enable = true;
initrdBin = bins;
services.impermanence = {
description = "Rollback BTRFS subvolumes to a pristine state";
wantedBy = [ "initrd.target" ];
before = [ "sysroot.mount" ];
after = [ "cryptsetup.target" ];
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
path = bins;
script = builtins.readFile ./scripts/wipe.sh;
};
boot.initrd.systemd = {
enable = true;
initrdBin = with pkgs; [
coreutils
util-linux
findutils
btrfs-progs
];
services.impermanence = {
description = "Rollback BTRFS subvolumes to a pristine state";
wantedBy = [ "initrd.target" ];
before = [ "sysroot.mount" ];
after = [ "cryptsetup.target" ];
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
script = builtins.readFile ./scripts/wipe.sh;
};
};
# uuidgen -r | tr -d -
# https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/administration/systemd-state.section.md