-{ 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;
+ inherit (pkgs.webapps) roundcubemail;
+ env = config.myEnv.tools.roundcubemail;
+ inherit config;
+ };
+ 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 = {
];
config = lib.mkIf cfg.enable {
- services.duplyBackup.profiles.mail.excludeFile = ''
- + ${rainloop.varDir}
- + ${roundcubemail.varDir}
- '';
+ #myServices.chatonsProperties.services.mail-rainloop = {
+ # file.datetime = "2022-08-22T00:30:00";
+ # service = {
+ # name = "Rainloop";
+ # description = "Simple, modern & fast web-based email client";
+ # website = "https://mail.immae.eu/rainloop";
+ # logo = "https://www.rainloop.net/static/img/logo-16x16.png";
+ # status.level = "ERROR";
+ # status.description = "Stopped due to CVE-2022-29360";
+ # registration."" = ["MEMBER" "CLIENT"];
+ # registration.load = "OPEN";
+ # install.type = "PACKAGE";
+ # };
+ # software = {
+ # name = "Rainloop";
+ # website = "https://www.rainloop.net/";
+ # license.url = "https://www.rainloop.net/licensing/";
+ # license.name = "GNU Affero General Public License v3.0";
+ # version = rainloop.webRoot.version;
+ # source.url = "https://github.com/RainLoop/rainloop-webmail";
+ # };
+ #};
+ #myServices.chatonsProperties.services.mail-roundcube = {
+ # file.datetime = "2022-08-22T00:30:00";
+ # service = {
+ # name = "Roundcube";
+ # description = "The Roundcube Webmail suite";
+ # website = "https://mail.immae.eu/roundcube";
+ # logo = "https://mail.immae.eu/roundcube/skins/elastic/images/favicon.ico";
+ # status.level = "OK";
+ # status.description = "OK";
+ # registration."" = ["MEMBER" "CLIENT"];
+ # registration.load = "OPEN";
+ # install.type = "PACKAGE";
+ # };
+ # software = {
+ # name = "Roundcube";
+ # website = "https://roundcube.net/";
+ # license.url = "https://github.com/roundcube/roundcubemail/blob/master/LICENSE";
+ # license.name = "GNU General Public License v3.0";
+ # version = roundcubemail.webRoot.version;
+ # source.url = "https://github.com/roundcube/roundcubemail";
+ # modules = map (a: a.pluginName) roundcubemail.webRoot.plugins ++ map (a: a.skinName) roundcubemail.webRoot.skins;
+ # };
+ #};
secrets.keys = roundcubemail.keys;
services.websites.env.tools.modules =
certName = "mail";
addToCerts = true;
hosts = ["mail.immae.eu"];
- root = "/run/current-system/webapps/_mail";
+ root = ./www;
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>
+ <Directory ${./www}>
Require all granted
Options -Indexes
</Directory>
};
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({ enabled, all }: enabled ++ [ all.imagick all.redis ]);
};
- services.phpfpm.poolConfigs = {
- rainloop = rainloop.phpFpm.pool;
+ services.phpfpm.pools.rainloop = {
+ user = "wwwrun";
+ group = "wwwrun";
+ settings = rainloop.phpFpm.pool;
+ phpPackage = pkgs.php72.withExtensions({ enabled, all }: enabled ++ [ all.redis ]);
};
system.activationScripts = {
roundcubemail = roundcubemail.activationScript;
rainloop = rainloop.activationScript;
};
-
- myServices.websites.webappDirs = {
- _mail = ./www;
- "${roundcubemail.apache.webappName}" = roundcubemail.webRoot;
- "${rainloop.apache.webappName}" = rainloop.webRoot;
- };
-
};
}