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