Skip to content

Commit

Permalink
encrypted devices: add label set assertion (#29651)
Browse files Browse the repository at this point in the history
  • Loading branch information
infinisil authored and zimbatm committed Sep 23, 2017
1 parent 81e4fbe commit aca6a2b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nixos/modules/tasks/encrypted-devices.nix
Expand Up @@ -56,6 +56,13 @@ in
};

config = mkIf anyEncrypted {
assertions = map (dev: {
assertion = dev.label != null;
message = ''
The filesystem for ${dev.mountPoint} has encrypted.enable set to true, but no encrypted.label set
'';
}) encDevs;

boot.initrd = {
luks = {
devices =
Expand Down

0 comments on commit aca6a2b

Please sign in to comment.