X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Ftools%2Fmail%2Fdefault.nix;h=7d7904fdd057efa4e77b395094c143b5f683966e;hb=f5761aac8dbfb4af91c232f2b52d1353c899abda;hp=218c3a56d3290321700f929b1ef444794e5bad05;hpb=d2e703c560bc029c3d607058de2935bbf1cb0559;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 218c3a5..7d7904f 100644 --- a/modules/private/websites/tools/mail/default.nix +++ b/modules/private/websites/tools/mail/default.nix @@ -1,11 +1,14 @@ -{ 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 { + rainloop = pkgs.rainloop-community; }; - rainloop = pkgs.callPackage ./rainloop.nix {}; cfg = config.myServices.websites.tools.email; + pcfg = config.services.phpfpm.pools; in { options.myServices.websites.tools.email = { @@ -34,8 +37,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 +59,26 @@ in }; services.phpfpm.pools.roundcubemail = { - listen = roundcubemail.phpFpm.socket; - extraConfig = roundcubemail.phpFpm.pool; - phpOptions = config.services.phpfpm.phpOptions + roundcubemail.phpFpm.phpConfig; + user = "wwwrun"; + group = "wwwrun"; + settings = roundcubemail.phpFpm.pool; + phpOptions = config.services.phpfpm.phpOptions + '' + date.timezone = 'CET' + ''; + phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [ e.imagick ]); }; - services.phpfpm.poolConfigs = { - rainloop = rainloop.phpFpm.pool; + services.phpfpm.pools.rainloop = { + user = "wwwrun"; + group = "wwwrun"; + settings = rainloop.phpFpm.pool; + phpPackage = pkgs.php72; }; 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;