1 { lib, pkgs, config, myconfig, mylibs, ... }:
3 chloe = pkgs.callPackage ./chloe.nix { inherit (mylibs) fetchedGitPrivate; };
5 config = myconfig.env.websites.chloe.integration;
8 config = myconfig.env.websites.chloe.production;
11 cfg = config.services.myWebsites.Chloe;
13 options.services.myWebsites.Chloe = {
15 enable = lib.mkEnableOption "enable Chloe's website in production";
18 enable = lib.mkEnableOption "enable Chloe's website in integration";
26 config = lib.mkMerge [
27 (lib.mkIf cfg.production.enable {
28 services.myWebsites.commons.stats.enable = true;
29 services.myWebsites.commons.stats.sites = [
31 name = "osteopathe-cc.fr";
32 conf = ./goaccess.conf;
36 security.acme.certs."chloe" = config.services.myCertificates.certConfig // {
37 domain = "osteopathe-cc.fr";
39 "www.osteopathe-cc.fr" = null;
43 services.myPhpfpm.poolConfigs.chloe_prod = chloe_prod.phpFpm.pool;
44 services.myPhpfpm.poolPhpConfigs.chloe_prod = ''
45 extension=${pkgs.php}/lib/php/extensions/mysqli.so
47 system.activationScripts.chloe_prod = chloe_prod.activationScript;
48 system.extraSystemBuilderCmds = ''
50 ln -s ${chloe_prod.webRoot} $out/webapps/${chloe_prod.apache.webappName}
52 services.myWebsites.production.modules = chloe_prod.apache.modules;
53 services.myWebsites.production.vhostConfs.chloe = {
55 hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ];
56 root = chloe_prod.apache.root;
57 extraConfig = [ chloe_prod.apache.vhostConf ];
60 (lib.mkIf cfg.integration.enable {
61 security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null;
62 services.myPhpfpm.poolConfigs.chloe_dev = chloe_dev.phpFpm.pool;
63 services.myPhpfpm.poolPhpConfigs.chloe_dev = ''
64 extension=${pkgs.php}/lib/php/extensions/mysqli.so
66 system.activationScripts.chloe_dev = chloe_dev.activationScript;
67 system.extraSystemBuilderCmds = ''
69 ln -s ${chloe_dev.webRoot} $out/webapps/${chloe_dev.apache.webappName}
71 services.myWebsites.integration.modules = chloe_dev.apache.modules;
72 services.myWebsites.integration.vhostConfs.chloe = {
74 hosts = ["chloe.immae.eu" ];
75 root = chloe_dev.apache.root;
76 extraConfig = [ chloe_dev.apache.vhostConf ];