nixos/luksroot: allow discards with fido2luks

This commit is contained in:
Dan Callaghan 2022-04-28 20:59:22 +10:00
parent 7aad0871d5
commit da26caad10
No known key found for this signature in database
GPG Key ID: 26B5AA2FDAF2F30A

View File

@ -433,7 +433,7 @@ let
echo "Please move your mouse to create needed randomness."
''}
echo "Waiting for your FIDO2 device..."
fido2luks open ${dev.device} ${dev.name} ${dev.fido2.credential} --await-dev ${toString dev.fido2.gracePeriod} --salt string:$passphrase
fido2luks open${optionalString dev.allowDiscards " --allow-discards"} ${dev.device} ${dev.name} ${dev.fido2.credential} --await-dev ${toString dev.fido2.gracePeriod} --salt string:$passphrase
if [ $? -ne 0 ]; then
echo "No FIDO2 key found, falling back to normal open procedure"
open_normally