]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/mail/default.nix
Remove duply-backup
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / mail / default.nix
index 7c60ae45b110c9a0a2538ee7ffdcb7ac972b5460..390f7adb98dd37fcd11f23ededa22ee028b515f7 100644 (file)
@@ -3,6 +3,7 @@ let
   roundcubemail = pkgs.callPackage ./roundcubemail.nix {
     inherit (pkgs.webapps) roundcubemail;
     env = config.myEnv.tools.roundcubemail;
+    inherit config;
   };
   rainloop = pkgs.callPackage ./rainloop.nix {
     rainloop = pkgs.rainloop-community;
@@ -20,10 +21,6 @@ in
   ];
 
   config = lib.mkIf cfg.enable {
-    services.duplyBackup.profiles.mail.excludeFile = ''
-      + ${rainloop.varDir}
-      + ${roundcubemail.varDir}
-      '';
     secrets.keys = roundcubemail.keys;
 
     services.websites.env.tools.modules =
@@ -35,12 +32,12 @@ in
       certName   = "mail";
       addToCerts = true;
       hosts      = ["mail.immae.eu"];
-      root       = "/run/current-system/webapps/_mail";
+      root       = ./www;
       extraConfig = [
         (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>
@@ -65,7 +62,7 @@ in
       phpOptions = config.services.phpfpm.phpOptions + ''
         date.timezone = 'CET'
       '';
-      phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [ e.imagick ]);
+      phpPackage = pkgs.php72.withExtensions({ enabled, all }: enabled ++ [ all.imagick ]);
     };
     services.phpfpm.pools.rainloop = {
       user = "wwwrun";
@@ -77,13 +74,6 @@ in
       roundcubemail = roundcubemail.activationScript;
       rainloop = rainloop.activationScript;
     };
-
-    services.websites.webappDirs = {
-      _mail = ./www;
-      "${roundcubemail.apache.webappName}" = roundcubemail.webRoot;
-      "${rainloop.apache.webappName}" = rainloop.webRoot;
-    };
-
   };
 
 }