{ lib, pkgs, config, myconfig, ... }: let adminer = pkgs.callPackage ../commons/adminer.nix {}; tellesflorian = pkgs.callPackage ./builder_app.nix { inherit (pkgs.webapps) tellesflorian; config = myconfig.env.websites.tellesflorian.integration; apacheUser = config.services.httpd.Inte.user; apacheGroup = config.services.httpd.Inte.group; }; cfg = config.myServices.websites.florian.app; in { options.myServices.websites.florian.app.enable = lib.mkEnableOption "enable Florian's app in integration"; config = lib.mkIf cfg.enable { secrets.keys = tellesflorian.keys; systemd.services.phpfpm-tellesflorian_dev.after = lib.mkAfter tellesflorian.phpFpm.serviceDeps; systemd.services.phpfpm-tellesflorian_dev.wants = tellesflorian.phpFpm.serviceDeps; systemd.services.phpfpm-tellesflorian_dev.preStart = lib.mkAfter tellesflorian.phpFpm.preStart; services.phpfpm.poolConfigs.tellesflorian_dev = tellesflorian.phpFpm.pool; system.activationScripts.tellesflorian_dev = tellesflorian.activationScript; system.extraSystemBuilderCmds = '' mkdir -p $out/webapps ln -s ${tellesflorian.app.webRoot} $out/webapps/${tellesflorian.apache.webappName} ''; services.websites.integration.modules = adminer.apache.modules ++ tellesflorian.apache.modules; services.websites.integration.vhostConfs.tellesflorian = { certName = "eldiron"; addToCerts = true; hosts = ["app.tellesflorian.com" ]; root = tellesflorian.apache.root; extraConfig = [ tellesflorian.apache.vhostConf adminer.apache.vhostConf ]; }; }; }