]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - modules/private/websites/chloe/integration.nix
Replace myPhpfpm with correct overrides
[perso/Immae/Config/Nix.git] / modules / private / websites / chloe / integration.nix
CommitLineData
f8026b6e
IB
1{ lib, pkgs, config, myconfig, ... }:
2let
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;
11in {
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;
f40f5b23
IB
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
f8026b6e 23 '';
f40f5b23 24 };
f8026b6e
IB
25 system.activationScripts.chloe_dev = chloe.activationScript;
26 system.extraSystemBuilderCmds = ''
27 mkdir -p $out/webapps
28 ln -s ${chloe.app.webRoot} $out/webapps/${chloe.apache.webappName}
29 '';
30 services.websites.integration.modules = chloe.apache.modules;
31 services.websites.integration.vhostConfs.chloe = {
32 certName = "eldiron";
33 addToCerts = true;
34 hosts = ["chloe.immae.eu" ];
35 root = chloe.apache.root;
36 extraConfig = [ chloe.apache.vhostConf ];
37 };
38 };
39}