feat(lib/k8s): add allowNull to mkSecretOption

This commit is contained in:
Jaka Hudoklin 2020-01-15 09:51:29 +00:00
parent ba26ce8e60
commit dc200f8484
No known key found for this signature in database
GPG key ID: 11AA2A62319E4968

View file

@ -3,9 +3,9 @@
with lib; with lib;
rec { rec {
mkSecretOption = {description ? "", default ? {}}: mkOption ({ mkSecretOption = {description ? "", default ? {}, allowNull ? true}: mkOption {
inherit description; inherit description;
type = types.nullOr (types.submodule { type = (if allowNull then types.nullOr else id) (types.submodule {
options = { options = {
name = mkOption { name = mkOption {
description = "Name of the secret where secret is stored"; description = "Name of the secret where secret is stored";