X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Ftools%2Fmail%2Fdefault.nix;h=dda2d45056b89c08ae0e26481ae5bc6be9065906;hb=d3452fc59b9839846225fd254926c64a9c71f071;hp=35711af355a5796a87d7da39c3afc5b317fcbe7d;hpb=6a8252b11bb02f3e67857d5a9d733b1affa6a625;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/tools/mail/default.nix b/modules/private/websites/tools/mail/default.nix index 35711af..dda2d45 100644 --- a/modules/private/websites/tools/mail/default.nix +++ b/modules/private/websites/tools/mail/default.nix @@ -1,11 +1,12 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: let roundcubemail = pkgs.callPackage ./roundcubemail.nix { inherit (pkgs.webapps) roundcubemail roundcubemail-plugins roundcubemail-skins; - env = myconfig.env.tools.roundcubemail; + env = config.myEnv.tools.roundcubemail; }; rainloop = pkgs.callPackage ./rainloop.nix {}; cfg = config.myServices.websites.tools.email; + pcfg = config.services.phpfpm.pools; in { options.myServices.websites.tools.email = { @@ -17,7 +18,7 @@ in ]; config = lib.mkIf cfg.enable { - services.backup.profiles.mail.excludeFile = '' + services.duplyBackup.profiles.mail.excludeFile = '' + ${rainloop.varDir} + ${roundcubemail.varDir} ''; @@ -34,8 +35,8 @@ in hosts = ["mail.immae.eu"]; root = "/run/current-system/webapps/_mail"; extraConfig = [ - rainloop.apache.vhostConf - roundcubemail.apache.vhostConf + (rainloop.apache.vhostConf pcfg.rainloop.socket) + (roundcubemail.apache.vhostConf pcfg.roundcubemail.socket) '' Require all granted @@ -56,19 +57,22 @@ in }; services.phpfpm.pools.roundcubemail = { - listen = roundcubemail.phpFpm.socket; - extraConfig = roundcubemail.phpFpm.pool; + user = "wwwrun"; + group = "wwwrun"; + settings = roundcubemail.phpFpm.pool; phpOptions = config.services.phpfpm.phpOptions + roundcubemail.phpFpm.phpConfig; }; - services.phpfpm.poolConfigs = { - rainloop = rainloop.phpFpm.pool; + services.phpfpm.pools.rainloop = { + user = "wwwrun"; + group = "wwwrun"; + settings = rainloop.phpFpm.pool; }; system.activationScripts = { roundcubemail = roundcubemail.activationScript; rainloop = rainloop.activationScript; }; - myServices.websites.webappDirs = { + services.websites.webappDirs = { _mail = ./www; "${roundcubemail.apache.webappName}" = roundcubemail.webRoot; "${rainloop.apache.webappName}" = rainloop.webRoot;