diff options
Diffstat (limited to 'nixops/modules/websites/connexionswing/default.nix')
-rw-r--r-- | nixops/modules/websites/connexionswing/default.nix | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/nixops/modules/websites/connexionswing/default.nix b/nixops/modules/websites/connexionswing/default.nix deleted file mode 100644 index 20c5166..0000000 --- a/nixops/modules/websites/connexionswing/default.nix +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | ||
2 | let | ||
3 | connexionswing_dev = pkgs.callPackage ./connexionswing.nix { | ||
4 | inherit (pkgs.webapps) connexionswing; | ||
5 | config = myconfig.env.websites.connexionswing.integration; | ||
6 | }; | ||
7 | connexionswing_prod = pkgs.callPackage ./connexionswing.nix { | ||
8 | inherit (pkgs.webapps) connexionswing; | ||
9 | config = myconfig.env.websites.connexionswing.production; | ||
10 | }; | ||
11 | |||
12 | cfg = config.services.myWebsites.Connexionswing; | ||
13 | in { | ||
14 | options.services.myWebsites.Connexionswing = { | ||
15 | production = { | ||
16 | enable = lib.mkEnableOption "enable Connexionswing's website in production"; | ||
17 | }; | ||
18 | integration = { | ||
19 | enable = lib.mkEnableOption "enable Connexionswing's website in integration"; | ||
20 | }; | ||
21 | }; | ||
22 | |||
23 | config = lib.mkMerge [ | ||
24 | (lib.mkIf cfg.production.enable { | ||
25 | secrets.keys = connexionswing_prod.keys; | ||
26 | services.webstats.sites = [ { name = "connexionswing.com"; } ]; | ||
27 | |||
28 | services.myPhpfpm.preStart.connexionswing_prod = connexionswing_prod.phpFpm.preStart; | ||
29 | services.myPhpfpm.serviceDependencies.connexionswing_prod = connexionswing_prod.phpFpm.serviceDeps; | ||
30 | services.myPhpfpm.poolConfigs.connexionswing_prod = connexionswing_prod.phpFpm.pool; | ||
31 | services.myPhpfpm.poolPhpConfigs.connexionswing_prod = connexionswing_prod.phpFpm.phpConfig; | ||
32 | system.activationScripts.connexionswing_prod = connexionswing_prod.activationScript; | ||
33 | system.extraSystemBuilderCmds = '' | ||
34 | mkdir -p $out/webapps | ||
35 | ln -s ${connexionswing_prod.app.webRoot} $out/webapps/${connexionswing_prod.apache.webappName} | ||
36 | ''; | ||
37 | services.websites.production.modules = connexionswing_prod.apache.modules; | ||
38 | services.websites.production.vhostConfs.connexionswing = { | ||
39 | certName = "connexionswing"; | ||
40 | certMainHost = "connexionswing.com"; | ||
41 | hosts = ["connexionswing.com" "sandetludo.com" "www.connexionswing.com" "www.sandetludo.com" ]; | ||
42 | root = connexionswing_prod.apache.root; | ||
43 | extraConfig = [ connexionswing_prod.apache.vhostConf ]; | ||
44 | }; | ||
45 | }) | ||
46 | (lib.mkIf cfg.integration.enable { | ||
47 | secrets.keys = connexionswing_dev.keys; | ||
48 | services.myPhpfpm.preStart.connexionswing_dev = connexionswing_dev.phpFpm.preStart; | ||
49 | services.myPhpfpm.serviceDependencies.connexionswing_dev = connexionswing_dev.phpFpm.serviceDeps; | ||
50 | services.myPhpfpm.poolConfigs.connexionswing_dev = connexionswing_dev.phpFpm.pool; | ||
51 | services.myPhpfpm.poolPhpConfigs.connexionswing_dev = connexionswing_dev.phpFpm.phpConfig; | ||
52 | system.activationScripts.connexionswing_dev = connexionswing_dev.activationScript; | ||
53 | system.extraSystemBuilderCmds = '' | ||
54 | mkdir -p $out/webapps | ||
55 | ln -s ${connexionswing_dev.app.webRoot} $out/webapps/${connexionswing_dev.apache.webappName} | ||
56 | ''; | ||
57 | services.websites.integration.modules = connexionswing_dev.apache.modules; | ||
58 | services.websites.integration.vhostConfs.connexionswing = { | ||
59 | certName = "eldiron"; | ||
60 | addToCerts = true; | ||
61 | hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ]; | ||
62 | root = connexionswing_dev.apache.root; | ||
63 | extraConfig = [ connexionswing_dev.apache.vhostConf ]; | ||
64 | }; | ||
65 | }) | ||
66 | ]; | ||
67 | } | ||
68 | |||