nixos/parsedmarc: Fix smtp.to and default elasticsearch url

Previously evaluaton would fail if `smtp.to` was not set, since the
default case was not handled.

With the current versions of the python elasticsearch libraries, any
configuration containing the modules default would fail since it's not a
valid URL.

The issue adressed in #279068 is also adressed, thuse closes #279068.

e1mo 896919de e8229957

Changed files
+2 -2
nixos
modules
services
monitoring
+2 -2
nixos/modules/services/monitoring/parsedmarc.nix
···
description = ''
The addresses to send outgoing mail to.
'';
-
apply = x: if x == [] then null else lib.concatStringsSep "," x;
};
};
···
services.parsedmarc.settings = lib.mkMerge [
(lib.mkIf cfg.provision.elasticsearch {
elasticsearch = {
-
hosts = [ "localhost:9200" ];
ssl = false;
};
})
···
description = ''
The addresses to send outgoing mail to.
'';
+
apply = x: if x == [] || x == null then null else lib.concatStringsSep "," x;
};
};
···
services.parsedmarc.settings = lib.mkMerge [
(lib.mkIf cfg.provision.elasticsearch {
elasticsearch = {
+
hosts = [ "http://localhost:9200" ];
ssl = false;
};
})