mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-03-22 06:27:57 +05:00
services.dovecot2.modules option has been removed
This commit is contained in:
parent
0c40a0b2c6
commit
b4fbffe79c
@ -14,7 +14,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
{ options, config, pkgs, lib, ... }:
|
||||
|
||||
with (import ./common.nix { inherit config pkgs lib; });
|
||||
|
||||
@ -143,6 +143,12 @@ let
|
||||
else scope
|
||||
);
|
||||
|
||||
dovecotModules = [
|
||||
pkgs.dovecot_pigeonhole
|
||||
] ++ lib.optional cfg.fullTextSearch.enable pkgs.dovecot_fts_xapian;
|
||||
# Remove and assume `false` after NixOS 25.05
|
||||
haveDovecotModulesOption = options.services.dovecot2 ? "modules" && (options.services.dovecot2.modules.visible or true);
|
||||
|
||||
in
|
||||
{
|
||||
config = with cfg; lib.mkIf enable {
|
||||
@ -158,9 +164,14 @@ in
|
||||
# which are usually not compatible.
|
||||
environment.systemPackages = [
|
||||
pkgs.dovecot_pigeonhole
|
||||
];
|
||||
] ++ lib.optionals (!haveDovecotModulesOption) dovecotModules;
|
||||
|
||||
services.dovecot2 = {
|
||||
# For compatibility with python imaplib
|
||||
environment.etc = lib.mkIf (!haveDovecotModulesOption) {
|
||||
"dovecot/modules".source = "/run/current-system/sw/lib/dovecot/modules";
|
||||
};
|
||||
|
||||
services.dovecot2 = lib.mkMerge [{
|
||||
enable = true;
|
||||
enableImap = enableImap || enableImapSsl;
|
||||
enablePop3 = enablePop3 || enablePop3Ssl;
|
||||
@ -172,7 +183,6 @@ in
|
||||
sslServerCert = certificatePath;
|
||||
sslServerKey = keyPath;
|
||||
enableLmtp = true;
|
||||
modules = [ pkgs.dovecot_pigeonhole ] ++ (lib.optional cfg.fullTextSearch.enable pkgs.dovecot_fts_xapian );
|
||||
mailPlugins.globally.enable = lib.optionals cfg.fullTextSearch.enable [ "fts" "fts_xapian" ];
|
||||
protocols = lib.optional cfg.enableManageSieve "sieve";
|
||||
|
||||
@ -372,7 +382,11 @@ in
|
||||
lda_mailbox_autosubscribe = yes
|
||||
lda_mailbox_autocreate = yes
|
||||
'';
|
||||
};
|
||||
}
|
||||
(lib.mkIf haveDovecotModulesOption {
|
||||
modules = dovecotModules;
|
||||
})
|
||||
];
|
||||
|
||||
systemd.services.dovecot2 = {
|
||||
preStart = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user