]>
Commit | Line | Data |
---|---|---|
3013caf1 IB |
1 | { lib, pkgs, config, mylibs, ... }: |
2 | let | |
86f6924f IB |
3 | chloe = pkgs.callPackage ../../packages/chloe.nix { inherit (mylibs) checkEnv fetchedGitPrivate; }; |
4 | chloe_dev = chloe { environment = "dev"; }; | |
5 | chloe_prod = chloe { environment = "prod"; }; | |
6 | ||
3013caf1 IB |
7 | cfg = config.services.myWebsites.Chloe; |
8 | in { | |
9 | options.services.myWebsites.Chloe = { | |
10 | production = { | |
11 | enable = lib.mkEnableOption "enable Chloe's website in production"; | |
12 | }; | |
13 | integration = { | |
14 | enable = lib.mkEnableOption "enable Chloe's website in integration"; | |
15 | }; | |
16 | }; | |
17 | ||
18 | config = lib.mkMerge [ | |
19 | (lib.mkIf cfg.production.enable { | |
20 | security.acme.certs."chloe" = config.services.myCertificates.certConfig // { | |
21 | domain = "osteopathe-cc.fr"; | |
22 | extraDomains = { | |
23 | "www.osteopathe-cc.fr" = null; | |
24 | }; | |
25 | }; | |
86f6924f IB |
26 | |
27 | services.phpfpm.poolConfigs.chloe_prod = chloe_prod.phpFpm.pool; | |
28 | system.activationScripts.chloe_prod = chloe_prod.activationScript; | |
3013caf1 IB |
29 | }) |
30 | (lib.mkIf cfg.integration.enable { | |
31 | security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null; | |
86f6924f IB |
32 | services.phpfpm.poolConfigs.chloe_dev = chloe_dev.phpFpm.pool; |
33 | system.activationScripts.chloe_dev = chloe_dev.activationScript; | |
3013caf1 IB |
34 | }) |
35 | ]; | |
36 | } |