From 7aad0871d55e8fd4ebd75022522d8b9cadf8befb Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Thu, 28 Apr 2022 20:50:21 +1000 Subject: [PATCH 1/2] =?UTF-8?q?fido2luks:=200.2.19=20=E2=86=92=200.2.20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/security/fido2luks/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/fido2luks/default.nix b/pkgs/tools/security/fido2luks/default.nix index 1229620c21ca..3c67c4aa7800 100644 --- a/pkgs/tools/security/fido2luks/default.nix +++ b/pkgs/tools/security/fido2luks/default.nix @@ -9,13 +9,13 @@ rustPlatform.buildRustPackage rec { pname = "fido2luks"; - version = "0.2.19"; + version = "0.2.20"; src = fetchFromGitHub { owner = "shimunn"; repo = pname; rev = version; - sha256 = "sha256-o21KdsAE9KznobdMMKfVmVnENsLW3cMZjssnrsoN+KY="; + sha256 = "04gl7wn38f42mapmkf026rya668vvhm03yi8iqnz31xgggbr2irm"; }; buildInputs = [ cryptsetup ]; @@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec { export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib" ''; - cargoSha256 = "sha256-8JFe3mivf2Ewu1nLMugeeK+9ZXAGPHaqCyKfWfwLOc8="; + cargoSha256 = "1sp52zsj0s3736zih71plnk01si24jsawnx0580qfgg322d5f601"; meta = with lib; { description = "Decrypt your LUKS partition using a FIDO2 compatible authenticator"; From da26caad101efbd1e5c9e807f7f272e08cef94ae Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Thu, 28 Apr 2022 20:59:22 +1000 Subject: [PATCH 2/2] nixos/luksroot: allow discards with fido2luks --- nixos/modules/system/boot/luksroot.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 4103a7af57cd..1284b5693643 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -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