X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fmail%2Frspamd.nix;h=4d55fc2e98711ae29d39d6e2299d460331fb1dd8;hb=ab8f306d7c2c49b8116e1af7b355ed2384617ed9;hp=5e0a2392a08b4fd2cb74e9d9075fa9da49e101c1;hpb=8415083eb6acc343dfa404dbbc12fa0171a48a20;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/mail/rspamd.nix b/modules/private/mail/rspamd.nix index 5e0a239..4d55fc2 100644 --- a/modules/private/mail/rspamd.nix +++ b/modules/private/mail/rspamd.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: { options.myServices.mail.rspamd.sockets = lib.mkOption { type = lib.types.attrsOf lib.types.path; @@ -11,7 +11,7 @@ ''; }; config = lib.mkIf config.myServices.mail.enable { - services.backup.profiles.mail.excludeFile = '' + services.duplyBackup.profiles.mail.excludeFile = '' + /var/lib/rspamd ''; services.cron.systemCronJobs = let @@ -43,14 +43,14 @@ }; locals = { "redis.conf".text = '' - servers = "${myconfig.env.mail.rspamd.redis.socket}"; - db = "${myconfig.env.mail.rspamd.redis.db}"; + servers = "${config.myEnv.mail.rspamd.redis.socket}"; + db = "${config.myEnv.mail.rspamd.redis.db}"; ''; "classifier-bayes.conf".text = '' users_enabled = true; backend = "redis"; - servers = "${myconfig.env.mail.rspamd.redis.socket}"; - database = "${myconfig.env.mail.rspamd.redis.db}"; + servers = "${config.myEnv.mail.rspamd.redis.socket}"; + database = "${config.myEnv.mail.rspamd.redis.db}"; autolearn = true; cache { backend = "redis"; @@ -69,8 +69,8 @@ workers = { controller = { extraConfig = '' - enable_password = "${myconfig.env.mail.rspamd.write_password_hashed}"; - password = "${myconfig.env.mail.rspamd.read_password_hashed}"; + enable_password = "${config.myEnv.mail.rspamd.write_password_hashed}"; + password = "${config.myEnv.mail.rspamd.read_password_hashed}"; ''; bindSockets = [ { socket = config.myServices.mail.rspamd.sockets.worker-controller;