};
rainloop = pkgs.callPackage ./rainloop.nix {};
cfg = config.myServices.websites.tools.email;
+ pcfg = config.services.phpfpm.pools;
in
{
options.myServices.websites.tools.email = {
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
};
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;