diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-10 23:02:54 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-10 23:20:03 +0100 |
commit | 091ae73429b8853e6ab971bffaccd84bdd59f40d (patch) | |
tree | 17ba770ff2e30c6f2b3f2e87dc8937093bd39e30 /virtual/modules/websites/chloe.nix | |
parent | ad915416a6886010139413f4fbc41ed827336aa2 (diff) | |
download | Nix-091ae73429b8853e6ab971bffaccd84bdd59f40d.tar.gz Nix-091ae73429b8853e6ab971bffaccd84bdd59f40d.tar.zst Nix-091ae73429b8853e6ab971bffaccd84bdd59f40d.zip |
Move packages fils to module
Diffstat (limited to 'virtual/modules/websites/chloe.nix')
-rw-r--r-- | virtual/modules/websites/chloe.nix | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/virtual/modules/websites/chloe.nix b/virtual/modules/websites/chloe.nix deleted file mode 100644 index 3309dd2..0000000 --- a/virtual/modules/websites/chloe.nix +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | { lib, pkgs, config, mylibs, ... }: | ||
2 | let | ||
3 | chloe = pkgs.callPackage ../../packages/chloe.nix { inherit (mylibs) checkEnv fetchedGitPrivate; }; | ||
4 | chloe_dev = chloe { environment = "dev"; }; | ||
5 | chloe_prod = chloe { environment = "prod"; }; | ||
6 | |||
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 | services.myWebsites.commons.stats.enable = true; | ||
21 | services.myWebsites.commons.stats.sites = [ | ||
22 | { | ||
23 | name = "osteopathe-cc.fr"; | ||
24 | conf = ../../packages/chloe_goaccess.conf; | ||
25 | } | ||
26 | ]; | ||
27 | |||
28 | security.acme.certs."chloe" = config.services.myCertificates.certConfig // { | ||
29 | domain = "osteopathe-cc.fr"; | ||
30 | extraDomains = { | ||
31 | "www.osteopathe-cc.fr" = null; | ||
32 | }; | ||
33 | }; | ||
34 | |||
35 | services.phpfpm.poolConfigs.chloe_prod = chloe_prod.phpFpm.pool; | ||
36 | system.activationScripts.chloe_prod = chloe_prod.activationScript; | ||
37 | services.myWebsites.production.modules = chloe_prod.apache.modules; | ||
38 | services.myWebsites.production.vhostConfs.chloe = { | ||
39 | certName = "chloe"; | ||
40 | hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ]; | ||
41 | root = chloe_prod.webRoot; | ||
42 | extraConfig = [ chloe_prod.apache.vhostConf ]; | ||
43 | }; | ||
44 | }) | ||
45 | (lib.mkIf cfg.integration.enable { | ||
46 | security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null; | ||
47 | services.phpfpm.poolConfigs.chloe_dev = chloe_dev.phpFpm.pool; | ||
48 | system.activationScripts.chloe_dev = chloe_dev.activationScript; | ||
49 | services.myWebsites.integration.modules = chloe_dev.apache.modules; | ||
50 | services.myWebsites.integration.vhostConfs.chloe = { | ||
51 | certName = "eldiron"; | ||
52 | hosts = ["chloe.immae.eu" ]; | ||
53 | root = chloe_dev.webRoot; | ||
54 | extraConfig = [ chloe_dev.apache.vhostConf ]; | ||
55 | }; | ||
56 | }) | ||
57 | ]; | ||
58 | } | ||