diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-13 21:25:24 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-24 01:40:13 +0200 |
commit | 252dd7d899b7a0deea1537cc5d2d48b825afffb0 (patch) | |
tree | f51c3c9cd7429b0b9553a840f26bee489be045bc /modules/private/websites/chloe/integration.nix | |
download | NUR-252dd7d899b7a0deea1537cc5d2d48b825afffb0.tar.gz NUR-252dd7d899b7a0deea1537cc5d2d48b825afffb0.tar.zst NUR-252dd7d899b7a0deea1537cc5d2d48b825afffb0.zip |
Initial commit published for NURnur_root
Diffstat (limited to 'modules/private/websites/chloe/integration.nix')
-rw-r--r-- | modules/private/websites/chloe/integration.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/private/websites/chloe/integration.nix b/modules/private/websites/chloe/integration.nix new file mode 100644 index 00000000..c42a4282 --- /dev/null +++ b/modules/private/websites/chloe/integration.nix | |||
@@ -0,0 +1,36 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | ||
2 | let | ||
3 | chloe = pkgs.callPackage ./builder.nix { | ||
4 | inherit (pkgs.webapps) chloe; | ||
5 | config = myconfig.env.websites.chloe.integration; | ||
6 | apacheUser = config.services.httpd.Inte.user; | ||
7 | apacheGroup = config.services.httpd.Inte.group; | ||
8 | }; | ||
9 | |||
10 | cfg = config.myServices.websites.chloe.integration; | ||
11 | in { | ||
12 | options.myServices.websites.chloe.integration.enable = lib.mkEnableOption "enable Chloe's website in integration"; | ||
13 | |||
14 | config = lib.mkIf cfg.enable { | ||
15 | secrets.keys = chloe.keys; | ||
16 | systemd.services.phpfpm-chloe_dev.after = lib.mkAfter chloe.phpFpm.serviceDeps; | ||
17 | systemd.services.phpfpm-chloe_dev.wants = chloe.phpFpm.serviceDeps; | ||
18 | services.phpfpm.pools.chloe_dev = { | ||
19 | listen = chloe.phpFpm.socket; | ||
20 | extraConfig = chloe.phpFpm.pool; | ||
21 | phpOptions = config.services.phpfpm.phpOptions + '' | ||
22 | extension=${pkgs.php}/lib/php/extensions/mysqli.so | ||
23 | ''; | ||
24 | }; | ||
25 | system.activationScripts.chloe_dev = chloe.activationScript; | ||
26 | myServices.websites.webappDirs."${chloe.apache.webappName}" = chloe.app.webRoot; | ||
27 | services.websites.integration.modules = chloe.apache.modules; | ||
28 | services.websites.integration.vhostConfs.chloe = { | ||
29 | certName = "eldiron"; | ||
30 | addToCerts = true; | ||
31 | hosts = ["chloe.immae.eu" ]; | ||
32 | root = chloe.apache.root; | ||
33 | extraConfig = [ chloe.apache.vhostConf ]; | ||
34 | }; | ||
35 | }; | ||
36 | } | ||