Loading
nixos/luks: allow empty passphrases in prompt
LUKS itself supports empty passphrases, and NixOS even has boot.initrd.luks.devices.<name>.tryEmptyPassphrase option, but still the NixOS interactive LUKS passphrase prompt rejects empty passphrases. Fix it. Implementation note. The "open" command line is changed due to details in how empty passphrases and trailing newlines are handled when reading from stdin. This code path is only for the interactive prompt, not when using keyfiles, and the "reuse passphrase" logic already strips trailing newlines, so that's nothing new.