mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
fix(lib): mkSecretOption fix defaults
This commit is contained in:
parent
73b1713fd0
commit
dcbb4ce2bb
1 changed files with 4 additions and 2 deletions
6
lib.nix
6
lib.nix
|
|
@ -50,15 +50,17 @@ rec {
|
|||
name = mkOption {
|
||||
description = "Name of the secret where secret is stored";
|
||||
type = types.str;
|
||||
} // optionalAttrs (hasAttr "default" options && options.default != null && hasAttr "name" options.default) {
|
||||
default = options.default.name;
|
||||
};
|
||||
|
||||
key = mkOption {
|
||||
description = "Name of the key where secret is stored";
|
||||
type = types.str;
|
||||
} // optionalAttrs (hasAttr "default" options && options.default != null && hasAttr "key" options.default) {
|
||||
default = options.default.key;
|
||||
};
|
||||
};
|
||||
} // optionalAttrs (hasAttr "default" options && options.default != null) {
|
||||
config = mkAllDefault options.default 1000;
|
||||
});
|
||||
|
||||
apply = value: if value == null then null else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue