From dc200f8484ca72d475bba804f33dcde11e895e70 Mon Sep 17 00:00:00 2001 From: Jaka Hudoklin Date: Wed, 15 Jan 2020 09:51:29 +0000 Subject: [PATCH] feat(lib/k8s): add allowNull to mkSecretOption --- lib/k8s.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/k8s.nix b/lib/k8s.nix index 475ead2..97b3266 100644 --- a/lib/k8s.nix +++ b/lib/k8s.nix @@ -3,9 +3,9 @@ with lib; rec { - mkSecretOption = {description ? "", default ? {}}: mkOption ({ + mkSecretOption = {description ? "", default ? {}, allowNull ? true}: mkOption { inherit description; - type = types.nullOr (types.submodule { + type = (if allowNull then types.nullOr else id) (types.submodule { options = { name = mkOption { description = "Name of the secret where secret is stored";