aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/papa/maison_bbc.nix
blob: 528c83209bb94df0df82729bb1f086202fceb792 (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
29
30
{ lib, config, ... }:
let
  cfg = config.myServices.websites.papa.maison_bbc;
  webappdirs = config.services.websites.webappDirsPaths;
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.webappDirs.papa_maison_bbc = ./maison_bbc_static;
    services.websites.env.production.vhostConfs.papa_maison_bbc = {
      certName     = "papa";
      addToCerts   = true;
      hosts        = [ "maison.bbc.bouya.org" ];
      root         = webappdirs.papa_maison_bbc;
      extraConfig  = [
        ''
        ErrorDocument 404 /index.html
        <Directory ${webappdirs.papa_maison_bbc}>
          DirectoryIndex index.htm index.html
          AllowOverride None
          Require all granted
        </Directory>
          ''
      ];
    };
  };
}