diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-18 10:49:00 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-18 10:49:00 +0200 |
commit | f8026b6e4c869aa108f6361c8ccd50890657994d (patch) | |
tree | 57cb311e520933bd2ab6ccbae05f2913799eb49e /modules/private/websites/chloe/integration.nix | |
parent | 4aac110f17f0528d90510eec00c9a8df60bcf04f (diff) | |
download | Nix-f8026b6e4c869aa108f6361c8ccd50890657994d.tar.gz Nix-f8026b6e4c869aa108f6361c8ccd50890657994d.tar.zst Nix-f8026b6e4c869aa108f6361c8ccd50890657994d.zip |
Move personal websites to modules
Diffstat (limited to 'modules/private/websites/chloe/integration.nix')
-rw-r--r-- | modules/private/websites/chloe/integration.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/private/websites/chloe/integration.nix b/modules/private/websites/chloe/integration.nix new file mode 100644 index 0000000..458e414 --- /dev/null +++ b/modules/private/websites/chloe/integration.nix | |||
@@ -0,0 +1,35 @@ | |||
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 | services.myPhpfpm.serviceDependencies.chloe_dev = chloe.phpFpm.serviceDeps; | ||
17 | services.myPhpfpm.poolConfigs.chloe_dev = chloe.phpFpm.pool; | ||
18 | services.myPhpfpm.poolPhpConfigs.chloe_dev = '' | ||
19 | extension=${pkgs.php}/lib/php/extensions/mysqli.so | ||
20 | ''; | ||
21 | system.activationScripts.chloe_dev = chloe.activationScript; | ||
22 | system.extraSystemBuilderCmds = '' | ||
23 | mkdir -p $out/webapps | ||
24 | ln -s ${chloe.app.webRoot} $out/webapps/${chloe.apache.webappName} | ||
25 | ''; | ||
26 | services.websites.integration.modules = chloe.apache.modules; | ||
27 | services.websites.integration.vhostConfs.chloe = { | ||
28 | certName = "eldiron"; | ||
29 | addToCerts = true; | ||
30 | hosts = ["chloe.immae.eu" ]; | ||
31 | root = chloe.apache.root; | ||
32 | extraConfig = [ chloe.apache.vhostConf ]; | ||
33 | }; | ||
34 | }; | ||
35 | } | ||