fix(desktop): issues

This commit is contained in:
Moritz Böhme 2023-12-10 17:08:27 +01:00
parent 1b22c1345f
commit 072d016f46
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
5 changed files with 10 additions and 26 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, ... }:
{
# needed for zfs pool
@ -83,26 +83,9 @@
};
};
# rollback to blank
boot.initrd.systemd.services.rollback = {
description = "Rollback ZFS datasets to a pristine state";
wantedBy = [
"initrd.target"
];
after = [
"zfs-import-zroot.service"
];
before = [
"sysroot.mount"
];
path = with pkgs; [
zfs
];
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
script = ''
zfs rollback -r zroot/encrypted/root@blank && echo "rollback complete"
'';
};
boot.initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r zroot/encrypted/root@blank && echo "rollback complete"
'';
fileSystems."/persist".neededForBoot = true;
# HACK: to fix issue of agenix running before impermanence
age.identityPaths = [