]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/mail/default.nix
Upgrade nixos
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / mail / default.nix
index bb3604231e399d5f321ee41936e2c3808eee4e7f..1f7f7bfe9fe2a787acdf8f63ea2385404f20aa4d 100644 (file)
@@ -6,6 +6,7 @@ let
   };
   rainloop = pkgs.callPackage ./rainloop.nix {};
   cfg = config.myServices.websites.tools.email;
+  pcfg = config.services.phpfpm.pools;
 in
 {
   options.myServices.websites.tools.email = {
@@ -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)
         ''
           <Directory /run/current-system/webapps/_mail>
             Require all granted
@@ -56,13 +57,15 @@ 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.pools.rainloop = {
-      listen = rainloop.phpFpm.socket;
-      extraConfig = rainloop.phpFpm.pool;
+      user = "wwwrun";
+      group = "wwwrun";
+      settings = rainloop.phpFpm.pool;
     };
     system.activationScripts = {
       roundcubemail = roundcubemail.activationScript;