aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/papa/maison_bbc.nix
blob: 3eb736ee1b80b515f77a213a7ff7aa3aa70c726f (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.papa.maison_bbc;
in {
  options.myServices.websites.papa.maison_bbc.enable = lib.mkEnableOption "enable Papa Maison bbc website";

  config = lib.mkIf cfg.enable {
    services.webstats.sites = [ { name = "maison.bbc.bouya.org"; } ];

    services.websites.env.production.vhostConfs.papa_maison_bbc = {
      certName     = "papa";
      addToCerts   = true;
      hosts        = [ "maison.bbc.bouya.org" ];
      root         = ./maison_bbc_static;
      extraConfig  = [
        ''
        ErrorDocument 404 /index.html
        <Directory ${./maison_bbc_static}>
          DirectoryIndex index.htm index.html
          AllowOverride None
          Require all granted
        </Directory>
          ''
      ];
    };
  };
}