aboutsummaryrefslogblamecommitdiff
path: root/nixops/modules/websites/ftp/release.nix
blob: 78ee2767a1be669b62568fb6618c7cc3776b600a (plain) (tree)





















































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

  imports = [
    ../commons/stats.nix
  ];

  config = lib.mkIf cfg.production.enable {
    services.myWebsites.commons.stats.enable = true;
    services.myWebsites.commons.stats.sites = [
      {
        name = "release.immae.eu";
        conf = ./release_goaccess.conf;
      }
    ];

    security.acme.certs."eldiron".extraDomains."release.immae.eu" = null;

    services.myWebsites.production.vhostConfs.release = {
      certName    = "eldiron";
      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>
        ''
      ];
    };
  };
}