summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authore1mo <git@e1mo.de>2024-03-28 19:25:37 +0100
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2024-04-27 04:55:52 +0200
commit896919ded57b9c8fbccc88f2e69cf44a8fe3e356 (patch)
treefd2d37c6fccc36092b4ad7d7b57c0b161719c2de
parente82299570ee4385cb711267b3daa164116081646 (diff)
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.
-rw-r--r--nixos/modules/services/monitoring/parsedmarc.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/monitoring/parsedmarc.nix b/nixos/modules/services/monitoring/parsedmarc.nix
index fa15e3b9e9c9..a14ade59c29e 100644
--- a/nixos/modules/services/monitoring/parsedmarc.nix
+++ b/nixos/modules/services/monitoring/parsedmarc.nix
@@ -301,7 +301,7 @@ in
description = ''
The addresses to send outgoing mail to.
'';
- apply = x: if x == [] then null else lib.concatStringsSep "," x;
+ apply = x: if x == [] || x == null then null else lib.concatStringsSep "," x;
};
};
@@ -446,7 +446,7 @@ in
services.parsedmarc.settings = lib.mkMerge [
(lib.mkIf cfg.provision.elasticsearch {
elasticsearch = {
- hosts = [ "localhost:9200" ];
+ hosts = [ "http://localhost:9200" ];
ssl = false;
};
})