From 1f670eeed324218d7a9e6431aa9bfc244f27ff13 Mon Sep 17 00:00:00 2001 From: Robert Schütz Date: Tue, 23 Jan 2024 15:33:08 -0800 Subject: nixos/parsedmarc: use top-level parsedmarc package --- nixos/modules/services/monitoring/parsedmarc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/monitoring/parsedmarc.nix b/nixos/modules/services/monitoring/parsedmarc.nix index 9191a4a697e0b..fa15e3b9e9c94 100644 --- a/nixos/modules/services/monitoring/parsedmarc.nix +++ b/nixos/modules/services/monitoring/parsedmarc.nix @@ -438,7 +438,7 @@ in ]; dashboards.settings.providers = lib.mkIf cfg.provision.grafana.dashboard [{ name = "parsedmarc"; - options.path = "${pkgs.python3Packages.parsedmarc.dashboard}"; + options.path = "${pkgs.parsedmarc.dashboard}"; }]; }; }; @@ -530,7 +530,7 @@ in MemoryDenyWriteExecute = true; LockPersonality = true; SystemCallArchitectures = "native"; - ExecStart = "${pkgs.python3Packages.parsedmarc}/bin/parsedmarc -c /run/parsedmarc/parsedmarc.ini"; + ExecStart = "${lib.getExe pkgs.parsedmarc} -c /run/parsedmarc/parsedmarc.ini"; }; }; -- cgit 1.4.1 From 896919ded57b9c8fbccc88f2e69cf44a8fe3e356 Mon Sep 17 00:00:00 2001 From: e1mo Date: Thu, 28 Mar 2024 19:25:37 +0100 Subject: 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. --- nixos/modules/services/monitoring/parsedmarc.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nixos') diff --git a/nixos/modules/services/monitoring/parsedmarc.nix b/nixos/modules/services/monitoring/parsedmarc.nix index fa15e3b9e9c94..a14ade59c29eb 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; }; }) -- cgit 1.4.1