]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - modules/private/websites/piedsjaloux/integration.nix
Replace myPhpfpm with correct overrides
[perso/Immae/Config/Nix.git] / modules / private / websites / piedsjaloux / integration.nix
CommitLineData
f8026b6e
IB
1{ lib, pkgs, config, myconfig, ... }:
2let
3 piedsjaloux = pkgs.callPackage ./builder.nix {
4 inherit (pkgs.webapps) piedsjaloux;
5 config = myconfig.env.websites.piedsjaloux.integration;
6 apacheUser = config.services.httpd.Inte.user;
7 apacheGroup = config.services.httpd.Inte.group;
8 };
9
10 cfg = config.myServices.websites.piedsjaloux.integration;
11in {
12 options.myServices.websites.piedsjaloux.integration.enable = lib.mkEnableOption "enable PiedsJaloux's website in integration";
13
14 config = lib.mkIf cfg.enable {
15 secrets.keys = piedsjaloux.keys;
f40f5b23
IB
16 systemd.services.phpfpm-piedsjaloux_dev.after = lib.mkAfter piedsjaloux.phpFpm.serviceDeps;
17 systemd.services.phpfpm-piedsjaloux_dev.wants = piedsjaloux.phpFpm.serviceDeps;
18 systemd.services.phpfpm-piedsjaloux_dev.preStart = lib.mkAfter piedsjaloux.phpFpm.preStart;
19 services.phpfpm.poolConfigs.piedsjaloux_dev = piedsjaloux.phpFpm.pool;
f8026b6e
IB
20 system.activationScripts.piedsjaloux_dev = piedsjaloux.activationScript;
21 system.extraSystemBuilderCmds = ''
22 mkdir -p $out/webapps
23 ln -s ${piedsjaloux.app.webRoot} $out/webapps/${piedsjaloux.apache.webappName}
24 '';
25 services.websites.integration.modules = piedsjaloux.apache.modules;
26 services.websites.integration.vhostConfs.piedsjaloux = {
27 certName = "eldiron";
28 addToCerts = true;
29 hosts = [ "piedsjaloux.immae.eu" ];
30 root = piedsjaloux.apache.root;
31 extraConfig = [ piedsjaloux.apache.vhostConf ];
32 };
33 };
34}
35