blob: 5ce3525f2e53eff22fca6acb580e3b115d33971b (
plain) (
tree)
|
|
{ lib, pkgs, config, mylibs, myconfig, ... }:
let
connexionswing = pkgs.callPackage ./connexionswing.nix { inherit (mylibs) fetchedGitPrivate; };
connexionswing_dev = connexionswing {
config = myconfig.env.websites.connexionswing.integration;
};
connexionswing_prod = connexionswing {
config = myconfig.env.websites.connexionswing.production;
};
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.myPhpfpm.poolConfigs.connexionswing_prod = connexionswing_prod.phpFpm.pool;
services.myPhpfpm.poolPhpConfigs.connexionswing_prod = connexionswing_prod.phpFpm.phpConfig;
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.myPhpfpm.poolConfigs.connexionswing_dev = connexionswing_dev.phpFpm.pool;
services.myPhpfpm.poolPhpConfigs.connexionswing_dev = connexionswing_dev.phpFpm.phpConfig;
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 ];
};
})
];
}
|