types luks: pass keyFile to nixos config

This commit is contained in:
lassulus committed 2023-07-10 19:04:15 +02:00
1 parent fc3c3817c9
commit 86e90d0fdb
1 file changed
+5 -1
+5 -1
View File
@@ -81,7 +81,11 @@
readOnly = true;
default = [ ]
# If initrdUnlock is true, then add a device entry to the initrd.luks.devices config.
++ (lib.optional config.initrdUnlock [{ boot.initrd.luks.devices.${config.name}.device = config.device; }])
++ (lib.optional config.initrdUnlock [{
boot.initrd.luks.devices.${config.name} = {
inherit (config) device keyFile;
};
}])
++ (lib.optional (config.content != null) config.content._config);
description = "NixOS configuration";
};