fix additionalKeyFiles option for passhprase

This commit is contained in:
arch 2023-07-06 21:20:38 +02:00 committed by lassulus
parent 9a454adcd6
commit 3c851fc951

View file

@ -91,7 +91,8 @@ in
cryptsetup luksOpen ${config.device} ${config.name} \
${toString config.extraOpenArgs} \
${keyFileArgs}
${lib.optionalString (config.keyFile != null) toString (lib.lists.forEach config.additionalKeyFiles (x: "cryptsetup luksAddKey ${config.device} --key-file ${config.keyFile} ${x};"))}
${lib.optionalString (config.keyFile != null) "--key-file ${config.keyFile}"}
${toString (lib.lists.forEach config.additionalKeyFiles (x: "cryptsetup luksAddKey ${config.device} ${lib.optionalString (config.keyFile != null) "--key-file ${config.keyFile}"} ${x};"))}
${lib.optionalString (config.content != null) config.content._create}
'';
};