diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/postfix-mta-sts-resolver.nix | 15 |
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; |
