diff options
Diffstat (limited to 'modules/private/websites/connexionswing/integration.nix')
-rw-r--r-- | modules/private/websites/connexionswing/integration.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/private/websites/connexionswing/integration.nix b/modules/private/websites/connexionswing/integration.nix new file mode 100644 index 00000000..1d8488a9 --- /dev/null +++ b/modules/private/websites/connexionswing/integration.nix | |||
@@ -0,0 +1,36 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | ||
2 | let | ||
3 | connexionswing = pkgs.callPackage ./builder.nix { | ||
4 | inherit (pkgs.webapps) connexionswing; | ||
5 | config = myconfig.env.websites.connexionswing.integration; | ||
6 | apacheUser = config.services.httpd.Inte.user; | ||
7 | apacheGroup = config.services.httpd.Inte.group; | ||
8 | }; | ||
9 | |||
10 | cfg = config.myServices.websites.connexionswing.integration; | ||
11 | in { | ||
12 | options.myServices.websites.connexionswing.integration.enable = lib.mkEnableOption "enable Connexionswing's website in integration"; | ||
13 | |||
14 | config = lib.mkIf cfg.enable { | ||
15 | secrets.keys = connexionswing.keys; | ||
16 | systemd.services.phpfpm-connexionswing_dev.after = lib.mkAfter connexionswing.phpFpm.serviceDeps; | ||
17 | systemd.services.phpfpm-connexionswing_dev.wants = connexionswing.phpFpm.serviceDeps; | ||
18 | systemd.services.phpfpm-connexionswing_dev.preStart = lib.mkAfter connexionswing.phpFpm.preStart; | ||
19 | services.phpfpm.pools.connexionswing_dev = { | ||
20 | listen = connexionswing.phpFpm.socket; | ||
21 | extraConfig = connexionswing.phpFpm.pool; | ||
22 | phpOptions = config.services.phpfpm.phpOptions + connexionswing.phpFpm.phpConfig; | ||
23 | }; | ||
24 | system.activationScripts.connexionswing_dev = connexionswing.activationScript; | ||
25 | myServices.websites.webappDirs."${connexionswing.apache.webappName}" = connexionswing.app.webRoot; | ||
26 | services.websites.integration.modules = connexionswing.apache.modules; | ||
27 | services.websites.integration.vhostConfs.connexionswing = { | ||
28 | certName = "eldiron"; | ||
29 | addToCerts = true; | ||
30 | hosts = ["connexionswing.immae.eu" "sandetludo.immae.eu" ]; | ||
31 | root = connexionswing.apache.root; | ||
32 | extraConfig = [ connexionswing.apache.vhostConf ]; | ||
33 | }; | ||
34 | }; | ||
35 | } | ||
36 | |||