mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
fix(lib): mkValueOrSecretOption allow value to be null
This commit is contained in:
parent
8c45a7e1d8
commit
c3b31f0161
1 changed files with 2 additions and 2 deletions
4
lib.nix
4
lib.nix
|
|
@ -31,7 +31,7 @@ rec {
|
|||
(pkgs.runCommand "value-to-b64" {} "echo '${value}' | ${pkgs.coreutils}/bin/base64 -w0 > $out");
|
||||
|
||||
mkValueOrSecretOption = {...}@options: mkOption ({
|
||||
type = types.either types.str (types.submodule {
|
||||
type = types.nullOr (types.either types.str (types.submodule {
|
||||
options.secret = mkOption {
|
||||
description = "Name of the secret where password is stored";
|
||||
type = types.str;
|
||||
|
|
@ -42,7 +42,7 @@ rec {
|
|||
type = types.str;
|
||||
default = "password";
|
||||
};
|
||||
});
|
||||
}));
|
||||
|
||||
apply = value:
|
||||
if isAttrs value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue