]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Add cip-ca mail website
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 7 Jun 2020 16:26:57 +0000 (18:26 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 7 Jun 2020 17:13:08 +0000 (19:13 +0200)
modules/private/default.nix
modules/private/mail/sympa.nix
modules/private/websites/cip-ca/sympa.nix [new file with mode: 0644]
modules/private/websites/default.nix

index 6173275a3a1d66fa6e69bb54e54e3d275509a6c6..21b98459367a47d7e7fc9b646d933b9a4d9b49e8 100644 (file)
@@ -24,6 +24,8 @@ set = {
   chloeInte = ./websites/chloe/integration.nix;
   chloeProd = ./websites/chloe/production.nix;
 
+  cipcaSympa = ./websites/cip-ca/sympa.nix;
+
   connexionswingInte = ./websites/connexionswing/integration.nix;
   connexionswingProd = ./websites/connexionswing/production.nix;
 
index 669c7100c1c64c972a8b85ba08dcdef193fd1f27..f7070e65be68d619bb83fe507314ea93f005e1b7 100644 (file)
@@ -98,6 +98,9 @@ in
         sympa_virtual = pkgs.writeText "virtual.sympa" ''
           sympa-request@${domain} postmaster@immae.eu
           sympa-owner@${domain}   postmaster@immae.eu
+
+          sympa-request@cip-ca.fr postmaster@immae.eu
+          sympa-owner@cip-ca.fr   postmaster@immae.eu
         '';
         sympa_transport = pkgs.writeText "transport.sympa" ''
           ${domain}                        error:User unknown in recipient table
@@ -105,6 +108,11 @@ in
           listmaster@${domain}             sympa:listmaster@${domain}
           bounce@${domain}                 sympabounce:sympa@${domain}
           abuse-feedback-report@${domain}  sympabounce:sympa@${domain}
+
+          sympa@cip-ca.fr                  sympa:sympa@cip-ca.fr
+          listmaster@cip-ca.fr             sympa:listmaster@cip-ca.fr
+          bounce@cip-ca.fr                 sympabounce:sympa@cip-ca.fr
+          abuse-feedback-report@cip-ca.fr  sympabounce:sympa@cip-ca.fr
         '';
       };
       config = {
@@ -157,6 +165,10 @@ in
           webHost = "mail.immae.eu";
           webLocation = "/sympa";
         };
+        "cip-ca.fr" = {
+          webHost = "mail.cip-ca.fr";
+          webLocation = "/sympa";
+        };
       };
 
       database = {
diff --git a/modules/private/websites/cip-ca/sympa.nix b/modules/private/websites/cip-ca/sympa.nix
new file mode 100644 (file)
index 0000000..bb66fc6
--- /dev/null
@@ -0,0 +1,28 @@
+{ lib, config, ... }:
+let
+  cfg = config.myServices.websites.cip-ca.sympa;
+in
+{
+  options.myServices.websites.cip-ca.sympa.enable = lib.mkEnableOption "enable cip-ca’s sympa website";
+  config = lib.mkIf cfg.enable {
+    services.websites.env.tools.vhostConfs.cipca_sympa = {
+      certName     = "cip-ca";
+      certMainHost = "mail.cip-ca.fr";
+      hosts        = [ "mail.cip-ca.fr" ];
+      root         = null;
+      extraConfig = [
+        ''
+          Alias /static-sympa/ /var/lib/sympa/static_content/
+          <Directory /var/lib/sympa/static_content/>
+            Require all granted
+            AllowOverride none
+          </Directory>
+          <Location /sympa>
+            SetHandler "proxy:unix:/run/sympa/wwsympa.socket|fcgi://"
+            Require all granted
+          </Location>
+          ''
+      ];
+    };
+  };
+}
index f192b3b3e33ef9f4be5042ac93de92d9a0f6b23c..27719cca5ef44608c087fb1fdf9f6b055ad50e95 100644 (file)
@@ -220,6 +220,10 @@ in
         production.enable = true;
       };
 
+      cip-ca = {
+        sympa.enable = true;
+      };
+
       connexionswing = {
         integration.enable = true;
         production.enable = true;