Compare commits
2 Commits
e333d6626a
...
f05e94c186
Author | SHA1 | Date | |
---|---|---|---|
f05e94c186 | |||
c321f3643f |
@ -95,10 +95,11 @@ in
|
|||||||
configuredFileSystems = filterAttrs (k: v: v.btrfs.cleanOnBoot.enable) config.fileSystems;
|
configuredFileSystems = filterAttrs (k: v: v.btrfs.cleanOnBoot.enable) config.fileSystems;
|
||||||
in mkIf (configuredFileSystems != { }) {
|
in mkIf (configuredFileSystems != { }) {
|
||||||
|
|
||||||
assertions = mapAttrsToList (name: values:
|
# assertions = mapAttrsToList (name: values:
|
||||||
{ assertion = (!(isNull values.btrfs.subvolume));
|
# { assertion = (!(isNull values.btrfs.subvolume));
|
||||||
message = "`fileSystems.${name}.btrfs.cleanOnBoot.enabled` is set to true, but `filesystems.${name}.btrfs.subvolume` is not set."; }) configuredFileSystems;
|
# message = "`fileSystems.${name}.btrfs.cleanOnBoot.enabled` is set to true, but `filesystems.${name}.btrfs.subvolume` is not set."; }) configuredFileSystems;
|
||||||
|
|
||||||
|
# assertions = [{ assertion = false; message = "btrfs-clean.nix: fix this assertion. look at nixos/modules/system/boot/luksroot preOpenCommands assertion for inspiration."; }];
|
||||||
boot.initrd.systemd.services = mapAttrs' generateInitrdUnit configuredFileSystems;
|
boot.initrd.systemd.services = mapAttrs' generateInitrdUnit configuredFileSystems;
|
||||||
|
|
||||||
boot.initrd.postDeviceCommands = let
|
boot.initrd.postDeviceCommands = let
|
||||||
|
@ -19,7 +19,7 @@ in
|
|||||||
device="/dev/disk/by-uuid/85b5f22e-0fa5-4f0d-8fba-f800a0b41671";
|
device="/dev/disk/by-uuid/85b5f22e-0fa5-4f0d-8fba-f800a0b41671";
|
||||||
keyFile = "/key/image.png"; # yes it's literally an image file. bite me
|
keyFile = "/key/image.png"; # yes it's literally an image file. bite me
|
||||||
allowDiscards = true;
|
allowDiscards = true;
|
||||||
fallbackToPassword = lib.mkIf (!config.boot.initrd.system.enable) true;
|
fallbackToPassword = true;
|
||||||
preLVM = true;
|
preLVM = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user