diff --git a/lib/types/luks.nix b/lib/types/luks.nix index 9404711a..843774a0 100644 --- a/lib/types/luks.nix +++ b/lib/types/luks.nix @@ -160,6 +160,16 @@ in done ''} cryptsetup -q luksFormat "${config.device}" ${toString config.extraFormatArgs} ${keyFileArgs} + else + if [ -z ''${IN_DISKO_TEST+x} ]; then + set +x + echo "Enter password for ${config.device}" + IFS= read -r -s password + export password + set -x + else + export password=disko + fi fi if ! cryptsetup status "${config.name}" >/dev/null; then