mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 14:03:28 +01:00
Rename keyFile to passwordFile and dedeprecate
This commit is contained in:
1 parent
6388d2859c
commit
3eb703b7bc
2 files changed
+11
-3
No files matched your search
@@ -29,7 +29,7 @@
|
|||||||
extraOpenArgs = [ "--allow-discards" ];
|
extraOpenArgs = [ "--allow-discards" ];
|
||||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||||
# for example use `echo -n "password" > /tmp/secret.key`
|
# for example use `echo -n "password" > /tmp/secret.key`
|
||||||
#keyFile = "/tmp/secret.key"; # Interactive
|
#passwordFile = "/tmp/secret.key"; # Interactive
|
||||||
settings.keyFile = "/tmp/secret.key";
|
settings.keyFile = "/tmp/secret.key";
|
||||||
additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||||
content = {
|
content = {
|
||||||
|
|||||||
+10
-2
@@ -3,8 +3,10 @@ let
|
|||||||
keyFile =
|
keyFile =
|
||||||
if lib.hasAttr "keyFile" config.settings
|
if lib.hasAttr "keyFile" config.settings
|
||||||
then config.settings.keyFile
|
then config.settings.keyFile
|
||||||
|
else if config.passwordFile != null
|
||||||
|
then config.passwordFile
|
||||||
else if config.keyFile != null
|
else if config.keyFile != null
|
||||||
then lib.warn "The option `keyFile` is deprecated. See the `settings` option." config.keyFile
|
then lib.warn "The option `keyFile` is deprecated. Use passwordFile instead" config.keyFile
|
||||||
else null;
|
else null;
|
||||||
keyFileArgs = ''\
|
keyFileArgs = ''\
|
||||||
${lib.optionalString (keyFile != null) "--key-file ${keyFile}"} \
|
${lib.optionalString (keyFile != null) "--key-file ${keyFile}"} \
|
||||||
@@ -31,7 +33,13 @@ in
|
|||||||
keyFile = lib.mkOption {
|
keyFile = lib.mkOption {
|
||||||
type = lib.types.nullOr diskoLib.optionTypes.absolute-pathname;
|
type = lib.types.nullOr diskoLib.optionTypes.absolute-pathname;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Path to the key for encryption";
|
description = "Path to the key for encryption (Renamed to passwordFile)";
|
||||||
|
example = "/tmp/disk.key";
|
||||||
|
};
|
||||||
|
passwordFile = lib.mkOption {
|
||||||
|
type = lib.types.nullOr diskoLib.optionTypes.absolute-pathname;
|
||||||
|
default = null;
|
||||||
|
description = "Path to the file which contains the password for initial encryption. Make sure it doesn't contain a trailing newline";
|
||||||
example = "/tmp/disk.key";
|
example = "/tmp/disk.key";
|
||||||
};
|
};
|
||||||
settings = lib.mkOption {
|
settings = lib.mkOption {
|
||||||
|
|||||||
Reference in new issue
Block a user