diff --git a/default.nix b/default.nix index 4008df3..17fd16d 100644 --- a/default.nix +++ b/default.nix @@ -944,28 +944,19 @@ in address = mkOption { type = types.str; # read the default from nixos' redis module - default = let - cf = config.services.redis.servers.rspamd.bind; - cfdefault = if cf == null then "127.0.0.1" else cf; - ips = lib.strings.splitString " " cfdefault; - ip = lib.lists.head (ips ++ [ "127.0.0.1" ]); - isIpv6 = ip: lib.lists.elem ":" (lib.stringToCharacters ip); - in - if (ip == "0.0.0.0" || ip == "::") - then "127.0.0.1" - else if isIpv6 ip then "[${ip}]" else ip; - defaultText = lib.literalMD "computed from `config.services.redis.servers.rspamd.bind`"; + default = config.services.redis.servers.rspamd.unixSocket; + defaultText = lib.literalExpression "config.services.redis.servers.rspamd.unixSocket"; description = '' - Address that rspamd should use to contact redis. + Path, IP address or hostname that Rspamd should use to contact Redis. ''; }; port = mkOption { - type = types.port; - default = config.services.redis.servers.rspamd.port; - defaultText = lib.literalExpression "config.services.redis.servers.rspamd.port"; + type = with types; nullOr port; + default = null; + example = lib.literalExpression "config.services.redis.servers.rspamd.port"; description = '' - Port that rspamd should use to contact redis. + Port that Rspamd should use to contact Redis. ''; }; diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 806de8e..0cade83 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -1,6 +1,14 @@ Release Notes ============= +NixOS 25.05 +----------- + +- Rspamd now connects to Redis over its Unix Domain Socket by default + (`merge request