mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 14:03:28 +01:00
Unlock luks devices once and only once
This commit is contained in:
1 parent
69265ccde5
commit
06fb9283ca
1 file changed
+3
-1
+3
-1
@@ -160,7 +160,9 @@ in
|
|||||||
cryptsetup -q luksFormat "${config.device}" ${toString config.extraFormatArgs} ${keyFileArgs}
|
cryptsetup -q luksFormat "${config.device}" ${toString config.extraFormatArgs} ${keyFileArgs}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
${cryptsetupOpen} --persistent
|
if ! cryptsetup status "${config.name}" >/dev/null; then
|
||||||
|
${cryptsetupOpen} --persistent
|
||||||
|
fi
|
||||||
${toString (
|
${toString (
|
||||||
lib.forEach config.additionalKeyFiles (keyFile: ''
|
lib.forEach config.additionalKeyFiles (keyFile: ''
|
||||||
cryptsetup luksAddKey "${config.device}" ${keyFile} ${keyFileArgs}
|
cryptsetup luksAddKey "${config.device}" ${keyFile} ${keyFileArgs}
|
||||||
|
|||||||
Reference in new issue
Block a user