diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index c8dc81383d6eb..5c84af45b828e 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -185,6 +185,10 @@ let echo "reused" passphrase=$(cat /crypt-ramfs/passphrase) break + elif [ -e /dev/mapper/${dev.name} ]; then + echo "opened externally" + rm -f /crypt-ramfs/device + return else # ask cryptsetup-askpass echo -n "${dev.device}" > /crypt-ramfs/device