blob: 6249e853b95b720b1d0b075815f387ea90d9401f (
plain) (
tree)
|
|
{ lib, pkgs, config, myconfig, ... }:
let
piedsjaloux = pkgs.callPackage ./builder.nix {
inherit (pkgs.webapps) piedsjaloux;
config = myconfig.env.websites.piedsjaloux.integration;
apacheUser = config.services.httpd.Inte.user;
apacheGroup = config.services.httpd.Inte.group;
};
cfg = config.myServices.websites.piedsjaloux.integration;
in {
options.myServices.websites.piedsjaloux.integration.enable = lib.mkEnableOption "enable PiedsJaloux's website in integration";
config = lib.mkIf cfg.enable {
secrets.keys = piedsjaloux.keys;
services.myPhpfpm.preStart.piedsjaloux_dev = piedsjaloux.phpFpm.preStart;
services.myPhpfpm.serviceDependencies.piedsjaloux_dev = piedsjaloux.phpFpm.serviceDeps;
services.myPhpfpm.poolConfigs.piedsjaloux_dev = piedsjaloux.phpFpm.pool;
system.activationScripts.piedsjaloux_dev = piedsjaloux.activationScript;
system.extraSystemBuilderCmds = ''
mkdir -p $out/webapps
ln -s ${piedsjaloux.app.webRoot} $out/webapps/${piedsjaloux.apache.webappName}
'';
services.websites.integration.modules = piedsjaloux.apache.modules;
services.websites.integration.vhostConfs.piedsjaloux = {
certName = "eldiron";
addToCerts = true;
hosts = [ "piedsjaloux.immae.eu" ];
root = piedsjaloux.apache.root;
extraConfig = [ piedsjaloux.apache.vhostConf ];
};
};
}
|