diff options
author | Felix Buehler <account@buehler.rocks> | 2023-06-10 20:16:12 +0200 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2023-07-12 09:36:28 +0100 |
commit | bec27fabee7ff51a4788840479b1730ed1b64427 (patch) | |
tree | 638353517b8f8eb3b5b8d4fbc7172cd1aa42d47d /nixos/modules/services/search | |
parent | b63179691fb19cd8bb63fbb005bb3120a36deba0 (diff) |
treewide: use lib.optional instead of 'then []'
Diffstat (limited to 'nixos/modules/services/search')
-rw-r--r-- | nixos/modules/services/search/kibana.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/search/kibana.nix b/nixos/modules/services/search/kibana.nix index 5eb2381d5d399..a5e132d5c38db 100644 --- a/nixos/modules/services/search/kibana.nix +++ b/nixos/modules/services/search/kibana.nix @@ -130,9 +130,9 @@ in { This defaults to the singleton list [ca] when the {option}`ca` option is defined. ''; - default = if cfg.elasticsearch.ca == null then [] else [ca]; + default = lib.optional (cfg.elasticsearch.ca != null) ca; defaultText = literalExpression '' - if config.${opt.elasticsearch.ca} == null then [ ] else [ ca ] + lib.optional (config.${opt.elasticsearch.ca} != null) ca ''; type = types.listOf types.path; }; |