From 9578dbac69ec3ddf9b2fd38a40d74332b7454dfa Mon Sep 17 00:00:00 2001 From: Antoine Eiche Date: Fri, 23 Jul 2021 23:21:36 +0200 Subject: [PATCH] Remove non longer supported configurations (<21.05) --- default.nix | 37 +++++++++++++++++-------------------- mail-server/clamav.nix | 14 +------------- 2 files changed, 18 insertions(+), 33 deletions(-) diff --git a/default.nix b/default.nix index dd800b1..5d94438 100644 --- a/default.nix +++ b/default.nix @@ -421,27 +421,24 @@ in The mailboxes for dovecot. Depending on the mail client used it might be necessary to change some mailbox's name. ''; - default = let - defMailBoxes = { - Trash = { - auto = "no"; - specialUse = "Trash"; - }; - Junk = { - auto = "subscribe"; - specialUse = "Junk"; - }; - Drafts = { - auto = "subscribe"; - specialUse = "Drafts"; - }; - Sent = { - auto = "subscribe"; - specialUse = "Sent"; - }; + default = { + Trash = { + auto = "no"; + specialUse = "Trash"; }; - in if (versionAtLeast version "20.09pre") then defMailBoxes - else (flip mapAttrsToList defMailBoxes (name: options: { inherit name; } // options)); + Junk = { + auto = "subscribe"; + specialUse = "Junk"; + }; + Drafts = { + auto = "subscribe"; + specialUse = "Drafts"; + }; + Sent = { + auto = "subscribe"; + specialUse = "Sent"; + }; + }; }; certificateScheme = mkOption { diff --git a/mail-server/clamav.nix b/mail-server/clamav.nix index a73d4e5..25418f0 100644 --- a/mail-server/clamav.nix +++ b/mail-server/clamav.nix @@ -18,25 +18,13 @@ let cfg = config.mailserver; - clamHasSettings = options.services.clamav.daemon ? settings; in -with lib; { config = lib.mkIf (cfg.enable && cfg.virusScanning) { - - # Remove extraConfig and settings conditional after 20.09 support is removed - services.clamav.daemon = { enable = true; - } // (if clamHasSettings then { settings.PhishingScanURLs = "no"; - } else { - extraConfig = '' - PhishingScanURLs no - ''; - }); - + }; services.clamav.updater.enable = true; }; } -