luks: fix interactive mount

Before that it was only attempted to unlock luks with the key from
`$password`, however that variable didn't exist before.
This commit is contained in:
Maximilian Bosch 2023-10-13 12:32:19 +02:00 committed by mergify[bot]
parent 3c41ae36ff
commit e738cac18e

View File

@ -137,6 +137,13 @@ in
{
dev = ''
if ! cryptsetup status ${config.name} >/dev/null 2>/dev/null; then
${lib.optionalString config.askPassword ''
set +x
echo "Enter password for ${config.device}"
read -s password
export password
set -x
''}
cryptsetup open ${config.device} ${config.name} \
${keyFileArgs}
fi