blob: 636b16eefba479049bd990b3b3a309e8ca7ba80e (
plain) (
tree)
|
|
{ lib, pkgs, config, mylibs, ... }:
let
connexionswing = pkgs.callPackage ./connexionswing.nix { inherit (mylibs) checkEnv fetchedGitPrivate; };
connexionswing_dev = connexionswing { environment = "dev"; };
connexionswing_prod = connexionswing { environment = "prod"; };
cfg = config.services.myWebsites.Connexionswing;
in {
options.services.myWebsites.Connexionswing = {
production = {
enable = lib.mkEnableOption "enable Connexionswing's website in production";
};
integration = {
enable = lib.mkEnableOption "enable Connexionswing's website in integration";
};
};
imports = [
../commons/stats.nix
];
config = lib.mkMerge [
(lib.mkIf cfg.production.enable {
services.myWebsites.commons.stats.enable = true;
services.myWebsites.commons.stats.sites = [
{
name = "connexionswing.com";
conf = ./goaccess.conf;
}
];
security.acme.certs."connexionswing" = config.services.myCertificates.certConfig // {
domain = "connexionswing.com";
extraDomains = {
"www.connexionswing.com" = null;
"sandetludo.com" = null;
"www.sandetludo.com" = null;
};
};
services.phpfpm.poolConfigs.connexionswing_prod = connexionswing_prod.phpFpm.pool;
system.activationScripts.connexionswing_prod = connexionswing_prod.activationScript;
services.myWebsites.production.modules = connexionswing_prod.apache.modules;
services.myWebsites.production.vhostConfs.connexionswing = {
certName = "connexionswing";
hosts = ["connexionswing.com" "sandetludo.com" "www.connexionswing.com" "www.sandetludo.com" ];
root = connexionswing_prod.webRoot;
extraConfig = [ connexionswing_prod.apache.vhostConf ];
};
})
(lib.mkIf cfg.integration.enable {
security.acme.certs."eldiron".extraDomains."sandetludo.immae.eu" = null;
security.acme.certs."eldiron".extraDomains."connexionswing.immae.eu" = null;
services.phpfpm.poolConfigs.connexionswing_dev = connexionswing_dev.phpFpm.pool;
system.activationScripts.connexionswing_dev = connexionswing_dev.activationScript;
services.myWebsites.integration.modules = connexionswing_dev.apache.modules;
services.myWebsites.integration.vhostConfs.connexionswing = {
certName = "eldiron";
hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ];
root = connexionswing_dev.webRoot;
extraConfig = [ connexionswing_dev.apache.vhostConf ];
};
})
];
}
|