Unlock luks devices once and only once

This commit is contained in:
Philipp Schmitt authored and Jörg Thalheim committed 2025-05-08 09:13:14 +00:00
1 parent 69265ccde5
commit 06fb9283ca
1 file changed
+3 -1
+3 -1
View File
@@ -160,7 +160,9 @@ in
cryptsetup -q luksFormat "${config.device}" ${toString config.extraFormatArgs} ${keyFileArgs}
fi
${cryptsetupOpen} --persistent
if ! cryptsetup status "${config.name}" >/dev/null; then
${cryptsetupOpen} --persistent
fi
${toString (
lib.forEach config.additionalKeyFiles (keyFile: ''
cryptsetup luksAddKey "${config.device}" ${keyFile} ${keyFileArgs}