diff --git a/.hydra/declarative-jobsets.nix b/.hydra/declarative-jobsets.nix
index a71242b..b831abe 100644
--- a/.hydra/declarative-jobsets.nix
+++ b/.hydra/declarative-jobsets.nix
@@ -17,35 +17,6 @@ let
flake = "gitlab:simple-nixos-mailserver/nixos-mailserver/merge-requests/${info.iid}/head";
}
) prs;
- # This could be removed once branch 21.11 would have been
- # removed.
- mkJobset = branch: {
- description = "Build ${branch} branch of Simple NixOS MailServer";
- checkinterval = "60";
- enabled = "1";
- schedulingshares = 100;
- enableemail = false;
- emailoverride = "";
- nixexprinput = "snm";
- nixexprpath = ".hydra/default.nix";
- type = 0;
- inputs = {
- # This is only used to allow Niv to use pkgs.fetchzip which is
- # required because of Hydra restricted evaluation mode.
- nixpkgs = {
- value = "https://github.com/NixOS/nixpkgs b6eefa48d8e10491e43c0c6155ac12b463f6fed3";
- type = "git";
- emailresponsible = false;
- };
- snm = {
- value = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver ${branch}";
- type = "git";
- emailresponsible = false;
- };
- };
- keepnr = 3;
- hidden = false;
- };
mkFlakeJobset = branch: {
description = "Build ${branch} branch of Simple NixOS MailServer";
checkinterval = "60";
@@ -61,7 +32,6 @@ let
desc = prJobsets // {
"master" = mkFlakeJobset "master";
- "nixos-21.11" = mkFlakeJobset "nixos-21.11";
};
log = {
diff --git a/README.md b/README.md
index 794a12c..a9494b4 100644
--- a/README.md
+++ b/README.md
@@ -19,9 +19,6 @@ SNM branch corresponding to your NixOS version.
* For NixOS unstable
- Use the [SNM branch `master`](https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/tree/master)
- [Documentation](https://nixos-mailserver.readthedocs.io/en/latest/)
- - This branch is currently supporting the NixOS release 21.11 but
- we could remove this support on any NixOS unstable breaking
- change.
[Subscribe to SNM Announcement List](https://www.freelists.org/list/snm)
This is a very low volume list where new releases of SNM are announced, so you
diff --git a/default.nix b/default.nix
index f142422..c438099 100644
--- a/default.nix
+++ b/default.nix
@@ -668,7 +668,7 @@ in
type = types.str;
# read the default from nixos' redis module
default = let
- cf = config.services.redis.bind;
+ 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" ]);
@@ -677,7 +677,7 @@ in
if (ip == "0.0.0.0" || ip == "::")
then "127.0.0.1"
else if isIpv6 ip then "[${ip}]" else ip;
- defaultText = lib.literalDocBook "computed from ";
+ defaultText = lib.literalDocBook "computed from ";
description = ''
Address that rspamd should use to contact redis.
'';
@@ -685,8 +685,8 @@ in
port = mkOption {
type = types.port;
- default = config.services.redis.port;
- defaultText = lib.literalExpression "config.services.redis.port";
+ default = config.services.redis.servers.rspamd.port;
+ defaultText = lib.literalExpression "config.services.redis.servers.rspamd.port";
description = ''
Port that rspamd should use to contact redis.
'';
@@ -694,8 +694,8 @@ in
password = mkOption {
type = types.nullOr types.str;
- default = config.services.redis.requirePass;
- defaultText = lib.literalExpression "config.services.redis.requirePass";
+ default = config.services.redis.servers.rspamd.requirePass;
+ defaultText = lib.literalExpression "config.services.redis.servers.rspamd.requirePass";
description = ''
Password that rspamd should use to contact redis, or null if not required.
'';
diff --git a/flake.lock b/flake.lock
index d78f8a8..eb8f927 100644
--- a/flake.lock
+++ b/flake.lock
@@ -18,11 +18,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1626852498,
- "narHash": "sha256-lOXUJvi0FJUXHTVSiC5qsMRtEUgqM4mGZpMESLuGhmo=",
+ "lastModified": 1642635915,
+ "narHash": "sha256-vabPA32j81xBO5m3+qXndWp5aqepe+vu96Wkd9UnngM=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "16105403bdd843540cbef9c63fc0f16c1c6eaa70",
+ "rev": "6d8215281b2f87a5af9ed7425a26ac575da0438f",
"type": "github"
},
"original": {
@@ -31,26 +31,10 @@
"type": "indirect"
}
},
- "nixpkgs-21_11": {
- "locked": {
- "lastModified": 1638371214,
- "narHash": "sha256-0kE6KhgH7n0vyuX4aUoGsGIQOqjIx2fJavpCWtn73rc=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "a640d8394f34714578f3e6335fc767d0755d78f9",
- "type": "github"
- },
- "original": {
- "id": "nixpkgs",
- "ref": "nixos-21.11",
- "type": "indirect"
- }
- },
"root": {
"inputs": {
"blobs": "blobs",
"nixpkgs": "nixpkgs",
- "nixpkgs-21_11": "nixpkgs-21_11",
"utils": "utils"
}
},
diff --git a/flake.nix b/flake.nix
index f7c35c8..35299aa 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,26 +4,20 @@
inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "flake:nixpkgs/nixos-unstable";
- nixpkgs-21_11.url = "flake:nixpkgs/nixos-21.11";
blobs = {
url = "gitlab:simple-nixos-mailserver/blobs";
flake = false;
};
};
- outputs = { self, utils, blobs, nixpkgs, nixpkgs-21_11 }: let
+ outputs = { self, utils, blobs, nixpkgs }: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
- # We want to test nixos-mailserver on several nixos releases
releases = [
{
name = "unstable";
pkgs = nixpkgs.legacyPackages.${system};
}
- {
- name = "21_11";
- pkgs = nixpkgs-21_11.legacyPackages.${system};
- }
];
testNames = [
"internal"
diff --git a/mail-server/rspamd.nix b/mail-server/rspamd.nix
index 371edde..8d22e76 100644
--- a/mail-server/rspamd.nix
+++ b/mail-server/rspamd.nix
@@ -98,11 +98,11 @@ in
};
- services.redis.enable = true;
+ services.redis.servers.rspamd.enable = true;
systemd.services.rspamd = {
- requires = [ "redis.service" ] ++ (lib.optional cfg.virusScanning "clamav-daemon.service");
- after = [ "redis.service" ] ++ (lib.optional cfg.virusScanning "clamav-daemon.service");
+ requires = [ "redis-rspamd.service" ] ++ (lib.optional cfg.virusScanning "clamav-daemon.service");
+ after = [ "redis-rspamd.service" ] ++ (lib.optional cfg.virusScanning "clamav-daemon.service");
};
systemd.services.postfix = {