From a6c3b1b28d57065f75bff391d6667f36c42a03a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 10 Aug 2024 18:16:26 +0200 Subject: [PATCH] opendkim: switch to expandable settings option --- mail-server/opendkim.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mail-server/opendkim.nix b/mail-server/opendkim.nix index cdb283c..ef60a3f 100644 --- a/mail-server/opendkim.nix +++ b/mail-server/opendkim.nix @@ -58,18 +58,18 @@ in enable = true; selector = cfg.dkimSelector; keyPath = cfg.dkimKeyDirectory; - domains = "csl:${builtins.concatStringsSep "," cfg.domains}"; - configFile = pkgs.writeText "opendkim.conf" ('' - Canonicalization ${cfg.dkimHeaderCanonicalization}/${cfg.dkimBodyCanonicalization} - UMask 0002 - Socket ${dkim.socket} - KeyTable file:${keyTable} - SigningTable file:${signingTable} - '' + (lib.optionalString cfg.debug '' - Syslog yes - SyslogSuccess yes - LogWhy yes - '')); + domains = "csl:${lib.concatStringsSep "," cfg.domains}"; + settings = { + Canonicalization = "${cfg.dkimHeaderCanonicalization}/${cfg.dkimBodyCanonicalization}"; + UMask = "0002"; + Socket = dkim.socket; + KeyTable = "file:${keyTable}"; + SigningTable = "file:${signingTable}"; + } // lib.optionalAttrs cfg.debug { + Syslog = "yes"; + SyslogSuccess = "yes"; + LogWhy = "yes"; + }; }; users.users = optionalAttrs (config.services.postfix.user == "postfix") {