From 6c7d42fc4844bc4f9af72dab531be8377825296a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 7 Jun 2020 18:26:57 +0200 Subject: [PATCH] Add cip-ca mail website --- modules/private/default.nix | 2 ++ modules/private/mail/sympa.nix | 12 ++++++++++ modules/private/websites/cip-ca/sympa.nix | 28 +++++++++++++++++++++++ modules/private/websites/default.nix | 4 ++++ 4 files changed, 46 insertions(+) create mode 100644 modules/private/websites/cip-ca/sympa.nix diff --git a/modules/private/default.nix b/modules/private/default.nix index 6173275..21b9845 100644 --- a/modules/private/default.nix +++ b/modules/private/default.nix @@ -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; diff --git a/modules/private/mail/sympa.nix b/modules/private/mail/sympa.nix index 669c710..f7070e6 100644 --- a/modules/private/mail/sympa.nix +++ b/modules/private/mail/sympa.nix @@ -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 index 0000000..bb66fc6 --- /dev/null +++ b/modules/private/websites/cip-ca/sympa.nix @@ -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/ + + Require all granted + AllowOverride none + + + SetHandler "proxy:unix:/run/sympa/wwsympa.socket|fcgi://" + Require all granted + + '' + ]; + }; + }; +} diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index f192b3b..27719cc 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix @@ -220,6 +220,10 @@ in production.enable = true; }; + cip-ca = { + sympa.enable = true; + }; + connexionswing = { integration.enable = true; production.enable = true; -- 2.41.0