aboutsummaryrefslogblamecommitdiff
path: root/modules/private/websites/immae/release.nix
blob: 5cc35ee2ebb64312878c67312236ee339bbce639 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                      
   


                                                 
    
                                                                                                  
 
                                
                                                                 
 
                                                           
                              
                         
























                                                       
{ lib, pkgs, config, myconfig,  ... }:
let
  cfg = config.myServices.websites.immae.release;
  varDir = "/var/lib/ftp/release.immae.eu";
  env = myconfig.env.websites.release;
in {
  options.myServices.websites.immae.release.enable = lib.mkEnableOption "enable Release' website";

  config = lib.mkIf cfg.enable {
    services.webstats.sites = [ { name = "release.immae.eu"; } ];

    services.websites.env.production.vhostConfs.release = {
      certName    = "eldiron";
      addToCerts  = true;
      hosts       = [ "release.immae.eu" ];
      root        = varDir;
      extraConfig = [
        ''
        Use Stats release.immae.eu

        Use Apaxy "${varDir}" "title .duplicity-ignore"
        <Directory "${varDir}">
          Use LDAPConnect
          Options Indexes
          AllowOverride All
          Require all granted
        </Directory>

        <Directory "${varDir}/packages">
          Use LDAPConnect
          Options Indexes FollowSymlinks
          AllowOverride None
          Require all granted
        </Directory>
        ''
      ];
    };
  };
}