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