]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - modules/private/websites/florian/app.nix
Replace myPhpfpm with correct overrides
[perso/Immae/Config/Nix.git] / modules / private / websites / florian / app.nix
CommitLineData
8a964143 1{ lib, pkgs, config, myconfig, ... }:
2f0f1c48 2let
c890321d 3 adminer = pkgs.callPackage ../commons/adminer.nix {};
2f0f1c48 4
f8026b6e 5 tellesflorian = pkgs.callPackage ./builder_app.nix {
8f904d0d 6 inherit (pkgs.webapps) tellesflorian;
c890321d 7 config = myconfig.env.websites.tellesflorian.integration;
f8026b6e
IB
8 apacheUser = config.services.httpd.Inte.user;
9 apacheGroup = config.services.httpd.Inte.group;
c890321d 10 };
2f0f1c48 11
f8026b6e 12 cfg = config.myServices.websites.florian.app;
2f0f1c48 13in {
f8026b6e 14 options.myServices.websites.florian.app.enable = lib.mkEnableOption "enable Florian's app in integration";
2f0f1c48 15
f8026b6e
IB
16 config = lib.mkIf cfg.enable {
17 secrets.keys = tellesflorian.keys;
f40f5b23
IB
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;
f8026b6e 22 system.activationScripts.tellesflorian_dev = tellesflorian.activationScript;
e5073add
IB
23 system.extraSystemBuilderCmds = ''
24 mkdir -p $out/webapps
f8026b6e 25 ln -s ${tellesflorian.app.webRoot} $out/webapps/${tellesflorian.apache.webappName}
e5073add 26 '';
f8026b6e 27 services.websites.integration.modules = adminer.apache.modules ++ tellesflorian.apache.modules;
daf64e3f 28 services.websites.integration.vhostConfs.tellesflorian = {
2f0f1c48 29 certName = "eldiron";
7df420c2 30 addToCerts = true;
2f0f1c48 31 hosts = ["app.tellesflorian.com" ];
f8026b6e 32 root = tellesflorian.apache.root;
2f0f1c48 33 extraConfig = [
f8026b6e 34 tellesflorian.apache.vhostConf
2f0f1c48
IB
35 adminer.apache.vhostConf
36 ];
37 };
38 };
39}