mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 05:23:28 +01:00
add additionalKeyFiles option to luks
This commit is contained in:
1 parent
68eb09b183
commit
7eb0940839
4 files changed
+10
No files matched your search
@@ -44,6 +44,12 @@ in
|
||||
};
|
||||
'';
|
||||
};
|
||||
additionalKeyFiles = lib.mkOption {
|
||||
type = lib.types.listOf diskoLib.optionTypes.absolute-pathname;
|
||||
default = [];
|
||||
description = "Path to additional key files for encryption";
|
||||
example = ["/tmp/disk2.key"];
|
||||
};
|
||||
initrdUnlock = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
@@ -82,6 +88,7 @@ in
|
||||
cryptsetup luksOpen ${config.device} ${config.name} \
|
||||
${toString config.extraOpenArgs} \
|
||||
${keyFileArgs}
|
||||
${toString (lib.lists.forEach config.additionalKeyFiles (x: "cryptsetup luksAddKey ${config.device} ${x} ${keyFileArgs}"))}
|
||||
${lib.optionalString (config.content != null) config.content._create}
|
||||
'';
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user