summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-07-11 10:35:04 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-07-11 10:35:04 +0200
commit759ed58c8f3a5678110982652a7a1fe4b9c80852 (patch)
treec1a05b6ef7d31d2a60d80f3ff291be6977fe5646
parent805fbd610bcba37288db449b365f498935c644c4 (diff)
downloadnixos-759ed58c8f3a5678110982652a7a1fe4b9c80852.tar
nixos-759ed58c8f3a5678110982652a7a1fe4b9c80852.tar.gz
nixos-759ed58c8f3a5678110982652a7a1fe4b9c80852.tar.bz2
nixos-759ed58c8f3a5678110982652a7a1fe4b9c80852.tar.xz
nixos-759ed58c8f3a5678110982652a7a1fe4b9c80852.zip
...
-rw-r--r--modules/postfix-mta-sts-resolver.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/postfix-mta-sts-resolver.nix b/modules/postfix-mta-sts-resolver.nix
index 86804758..fcbd9390 100644
--- a/modules/postfix-mta-sts-resolver.nix
+++ b/modules/postfix-mta-sts-resolver.nix
@@ -11,6 +11,7 @@ in {
11 package = mkPackageOption pkgs "postfix-mta-sts-resolver"; 11 package = mkPackageOption pkgs "postfix-mta-sts-resolver";
12 12
13 redis = mkEnableOption "redis cache" // { default = true; example = false; }; 13 redis = mkEnableOption "redis cache" // { default = true; example = false; };
14 proactive-policy-fetching = mkEnableOption "proactive policy fetching" // { default = true; example = false; };
14 15
15 loglevel = mkOption { 16 loglevel = mkOption {
16 type = types.enum ["debug" "info" "warn" "error" "fatal"]; 17 type = types.enum ["debug" "info" "warn" "error" "fatal"];
@@ -27,11 +28,15 @@ in {
27 services.postfix-mta-sts-resolver.settings = { 28 services.postfix-mta-sts-resolver.settings = {
28 path = "/run/postfix-mta-sts-resolver/map.sock"; 29 path = "/run/postfix-mta-sts-resolver/map.sock";
29 mode = 432; # 0o0660 30 mode = 432; # 0o0660
30 } // (optionalAttrs cfg.redis { cache = { 31 } // (optionalAttrs cfg.redis {
31 type = "redis"; 32 cache = {
32 options.url = "unix://${toString config.services.redis.servers.postfix-mta-sts-resolver.unixSocket}"; 33 type = "redis";
33 }; 34 options.url = "unix://${toString config.services.redis.servers.postfix-mta-sts-resolver.unixSocket}";
34 }); 35 };
36 })
37 // (optionalAttrs cfg.proactive-policy-fetching {
38 proactive_policy_fetching.enabled = true;
39 });
35 40
36 services.redis.servers.postfix-mta-sts-resolver = mkIf cfg.redis { 41 services.redis.servers.postfix-mta-sts-resolver = mkIf cfg.redis {
37 enable = true; 42 enable = true;