Fixed root filesystem being reseted after hibernation
This commit is contained in:
parent
4bbd4fba2e
commit
096a68ae96
1 changed files with 5 additions and 3 deletions
|
|
@ -54,15 +54,17 @@ in {
|
||||||
#https://blog.decent.id/post/nixos-systemd-initrd/
|
#https://blog.decent.id/post/nixos-systemd-initrd/
|
||||||
boot.initrd.systemd.services.btrfs-rollback-impermanence = lib.mkIf (isBtrfs && config.boot.initrd.systemd.enable) {
|
boot.initrd.systemd.services.btrfs-rollback-impermanence = lib.mkIf (isBtrfs && config.boot.initrd.systemd.enable) {
|
||||||
description = "Rollback BTRFS root dataset to blank snapshot";
|
description = "Rollback BTRFS root dataset to blank snapshot";
|
||||||
wantedBy = [
|
wantedBy = [ "initrd.target" ];
|
||||||
"initrd.target"
|
requires = [ "initrd-root-device.target" ];
|
||||||
];
|
|
||||||
after = [
|
after = [
|
||||||
|
"initrd-root-device.target"
|
||||||
# LUKS/TPM process
|
# LUKS/TPM process
|
||||||
"systemd-cryptsetup@root_vg.service"
|
"systemd-cryptsetup@root_vg.service"
|
||||||
|
"local-fs-pre.target"
|
||||||
];
|
];
|
||||||
before = [
|
before = [
|
||||||
"sysroot.mount"
|
"sysroot.mount"
|
||||||
|
"create-needed-for-boot-dirs.service"
|
||||||
];
|
];
|
||||||
unitConfig.DefaultDependencies = "no";
|
unitConfig.DefaultDependencies = "no";
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue