-{ lib, pkgs, config, myconfig, mylibs, ... }:
+{ lib, pkgs, config, myconfig, ... }:
let
- piedsjaloux = pkgs.callPackage ./piedsjaloux.nix { inherit (mylibs) fetchedGitPrivate; };
- piedsjaloux_dev = piedsjaloux {
- config = myconfig.env.websites.piedsjaloux.integration;
- };
- piedsjaloux_prod = piedsjaloux {
- config = myconfig.env.websites.piedsjaloux.production;
- };
+ piedsjaloux_dev = pkgs.callPackage ./piedsjaloux.nix {
+ inherit (pkgs.private.webapps) piedsjaloux;
+ config = myconfig.env.websites.piedsjaloux.integration;
+ };
+ piedsjaloux_prod = pkgs.callPackage ./piedsjaloux.nix {
+ inherit (pkgs.private.webapps) piedsjaloux;
+ config = myconfig.env.websites.piedsjaloux.production;
+ };
- cfg = config.services.myWebsites.PiedsJaloux;
+ cfg = config.services.myWebsites.PiedsJaloux;
in {
options.services.myWebsites.PiedsJaloux = {
production = {
};
};
- imports = [
- ../commons/stats.nix
- ];
-
config = lib.mkMerge [
(lib.mkIf cfg.production.enable {
- mySecrets.keys = piedsjaloux_prod.keys;
- services.myWebsites.commons.stats.enable = true;
- services.myWebsites.commons.stats.sites = [
- {
- name = "piedsjaloux.fr";
- conf = ./goaccess.conf;
- }
- ];
+ secrets.keys = piedsjaloux_prod.keys;
+ services.webstats.sites = [ { name = "piedsjaloux.fr"; } ];
security.acme.certs."piedsjaloux" = config.services.myCertificates.certConfig // {
domain = "piedsjaloux.fr";
system.activationScripts.piedsjaloux_prod = piedsjaloux_prod.activationScript;
system.extraSystemBuilderCmds = ''
mkdir -p $out/webapps
- ln -s ${piedsjaloux_prod.webRoot} $out/webapps/${piedsjaloux_prod.apache.webappName}
+ ln -s ${piedsjaloux_prod.app.webRoot} $out/webapps/${piedsjaloux_prod.apache.webappName}
'';
services.myWebsites.production.modules = piedsjaloux_prod.apache.modules;
services.myWebsites.production.vhostConfs.piedsjaloux = {
};
})
(lib.mkIf cfg.integration.enable {
- mySecrets.keys = piedsjaloux_dev.keys;
+ secrets.keys = piedsjaloux_dev.keys;
security.acme.certs."eldiron".extraDomains."piedsjaloux.immae.eu" = null;
services.myPhpfpm.preStart.piedsjaloux_dev = piedsjaloux_dev.phpFpm.preStart;
services.myPhpfpm.serviceDependencies.piedsjaloux_dev = piedsjaloux_dev.phpFpm.serviceDeps;
system.activationScripts.piedsjaloux_dev = piedsjaloux_dev.activationScript;
system.extraSystemBuilderCmds = ''
mkdir -p $out/webapps
- ln -s ${piedsjaloux_dev.webRoot} $out/webapps/${piedsjaloux_dev.apache.webappName}
+ ln -s ${piedsjaloux_dev.app.webRoot} $out/webapps/${piedsjaloux_dev.apache.webappName}
'';
services.myWebsites.integration.modules = piedsjaloux_dev.apache.modules;
services.myWebsites.integration.vhostConfs.piedsjaloux = {