aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/websites/ftp/denisejerome.nix
blob: 4069b46c05788d48d429e62142b4c02989947197 (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
31
32
33
34
35
36
37
38
{ lib, pkgs, config, myconfig, mylibs, ... }:
let
    cfg = config.services.myWebsites.DeniseJerome;
    varDir = "/var/lib/ftp/denisejerome";
    env = myconfig.env.websites.denisejerome;
in {
  options.services.myWebsites.DeniseJerome = {
    production = {
      enable = lib.mkEnableOption "enable Denise Jerome's website";
    };
  };

  config = lib.mkIf cfg.production.enable {
    services.webstats.sites = [ { name = "denisejerome.piedsjaloux.fr"; } ];

    security.acme.certs."denisejerome" = config.services.myCertificates.certConfig // {
      domain = "denisejerome.piedsjaloux.fr";
    };

    services.myWebsites.production.vhostConfs.denisejerome = {
      certName    = "denisejerome";
      hosts       = ["denisejerome.piedsjaloux.fr" ];
      root        = varDir;
      extraConfig = [
        ''
        Use Stats denisejerome.piedsjaloux.fr

        <Directory ${varDir}>
          DirectoryIndex index.htm index.html
          Options Indexes FollowSymLinks MultiViews Includes
          AllowOverride AuthConfig
          Require all granted
        </Directory>
          ''
      ];
    };
  };
}