aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/cip-ca/sympa.nix
blob: bb66fc60f37f4aec9708e46d2279b9de82d1b71f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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>
          ''
      ];
    };
  };
}