mirror of
https://codeberg.org/muon/home.git
synced 2026-07-03 23:49:35 +00:00
Update nix
This commit is contained in:
parent
835c6345ed
commit
68d5cac1be
4 changed files with 54 additions and 49 deletions
|
|
@ -13,10 +13,14 @@ with lib; {
|
|||
files = ["/var/lib/sops-nix/key.txt" "/etc/machine-id"];
|
||||
};
|
||||
|
||||
boot.initrd.postResumeCommands =
|
||||
lib.mkAfter # sh
|
||||
|
||||
''
|
||||
boot.initrd.systemd.services.rollback = {
|
||||
description = "Roll back root btrfs subvolume";
|
||||
wantedBy = ["initrd.target"];
|
||||
after = ["cryptsetup.target"];
|
||||
before = ["sysroot.mount"];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
mkdir /btrfs_tmp
|
||||
mount /dev/mapper/crypted /btrfs_tmp
|
||||
if [[ -e /btrfs_tmp/root ]]; then
|
||||
|
|
@ -40,5 +44,6 @@ with lib; {
|
|||
btrfs subvolume create /btrfs_tmp/root
|
||||
umount /btrfs_tmp
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue