mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
luksroot.nix: rename fallback to fallbackToPassword
This commit is contained in:
parent
601fc20248
commit
b8a85fccd9
1 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@ with lib;
|
||||||
let
|
let
|
||||||
luks = config.boot.initrd.luks;
|
luks = config.boot.initrd.luks;
|
||||||
|
|
||||||
openCommand = name': { name, device, header, keyFile, keyFileSize, allowDiscards, yubikey, fallback, ... }: assert name' == name; ''
|
openCommand = name': { name, device, header, keyFile, keyFileSize, allowDiscards, yubikey, fallbackToPassword, ... }: assert name' == name; ''
|
||||||
|
|
||||||
# Wait for a target (e.g. device, keyFile, header, ...) to appear.
|
# Wait for a target (e.g. device, keyFile, header, ...) to appear.
|
||||||
wait_target() {
|
wait_target() {
|
||||||
|
@ -45,10 +45,10 @@ let
|
||||||
${optionalString (header != null) "--header=${header}"} \
|
${optionalString (header != null) "--header=${header}"} \
|
||||||
> /.luksopen_args
|
> /.luksopen_args
|
||||||
${optionalString (keyFile != null) ''
|
${optionalString (keyFile != null) ''
|
||||||
${optionalString fallback "if [ -e ${keyFile} ]; then"}
|
${optionalString fallbackToPassword "if [ -e ${keyFile} ]; then"}
|
||||||
echo " --key-file=${keyFile} ${optionalString (keyFileSize != null) "--keyfile-size=${toString keyFileSize}"}" \
|
echo " --key-file=${keyFile} ${optionalString (keyFileSize != null) "--keyfile-size=${toString keyFileSize}"}" \
|
||||||
>> /.luksopen_args
|
>> /.luksopen_args
|
||||||
${optionalString fallback ''
|
${optionalString fallbackToPassword ''
|
||||||
else
|
else
|
||||||
echo "keyfile ${keyFile} not found -- fallback to interactive unlocking"
|
echo "keyfile ${keyFile} not found -- fallback to interactive unlocking"
|
||||||
fi
|
fi
|
||||||
|
@ -332,7 +332,7 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
fallback = mkOption {
|
fallbackToPassword = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = ''
|
description = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue