nixos/kibana: Filter empty lists

Some options (in particular elasticsearch.ssl.certificateAuthorities)
are not allowed to be empty.
This commit is contained in:
adisbladis 2019-09-07 13:24:24 +01:00
parent 723148f92e
commit 88a70c9669
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -9,7 +9,7 @@ let
lt6_6 = builtins.compareVersions cfg.package.version "6.6" < 0;
cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON (
(filterAttrsRecursive (n: v: v != null) ({
(filterAttrsRecursive (n: v: v != null && v != []) ({
server.host = cfg.listenAddress;
server.port = cfg.port;
server.ssl.certificate = cfg.cert;