Skip to content

Commit eca2323

Browse files
infinisilzimbatm
authored andcommittedSep 23, 2017
encrypted devices: add label set assertion (#29651)
1 parent 8d00191 commit eca2323

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎nixos/modules/tasks/encrypted-devices.nix

+7
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ in
5656
};
5757

5858
config = mkIf anyEncrypted {
59+
assertions = map (dev: {
60+
assertion = dev.label != null;
61+
message = ''
62+
The filesystem for ${dev.mountPoint} has encrypted.enable set to true, but no encrypted.label set
63+
'';
64+
}) encDevs;
65+
5966
boot.initrd = {
6067
luks = {
6168
devices =

0 commit comments

Comments
 (0)
Please sign in to comment.