about summary refs log tree commit diff
path: root/nixos/modules/services/search/kibana.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/search/kibana.nix')
-rw-r--r--nixos/modules/services/search/kibana.nix4
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;
       };