blob: e3bd2ddcc37742de8b5094b6e47cd848902d9bb7 (
plain) (
tree)
|
|
{ lib, pkgs, config, myconfig, ... }:
let
piedsjaloux = pkgs.callPackage ./builder.nix {
inherit (pkgs.webapps) piedsjaloux;
config = myconfig.env.websites.piedsjaloux.production;
apacheUser = config.services.httpd.Prod.user;
apacheGroup = config.services.httpd.Prod.group;
};
cfg = config.myServices.websites.piedsjaloux.production;
in {
options.myServices.websites.piedsjaloux.production.enable = lib.mkEnableOption "enable PiedsJaloux's website in production";
config = lib.mkIf cfg.enable {
secrets.keys = piedsjaloux.keys;
services.webstats.sites = [ { name = "piedsjaloux.fr"; } ];
systemd.services.phpfpm-piedsjaloux_prod.after = lib.mkAfter piedsjaloux.phpFpm.serviceDeps;
systemd.services.phpfpm-piedsjaloux_prod.wants = piedsjaloux.phpFpm.serviceDeps;
systemd.services.phpfpm-piedsjaloux_prod.preStart = lib.mkAfter piedsjaloux.phpFpm.preStart;
services.phpfpm.poolConfigs.piedsjaloux_prod = piedsjaloux.phpFpm.pool;
system.activationScripts.piedsjaloux_prod = piedsjaloux.activationScript;
myServices.websites.webappDirs."${piedsjaloux.apache.webappName}" = piedsjaloux.app.webRoot;
services.websites.production.modules = piedsjaloux.apache.modules;
services.websites.production.vhostConfs.piedsjaloux = {
certName = "piedsjaloux";
certMainHost = "piedsjaloux.fr";
hosts = [ "piedsjaloux.fr" "www.piedsjaloux.fr" ];
root = piedsjaloux.apache.root;
extraConfig = [ piedsjaloux.apache.vhostConf ];
};
};
}
|