diff options
Diffstat (limited to 'modules/private/websites/piedsjaloux/production.nix')
-rw-r--r-- | modules/private/websites/piedsjaloux/production.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/private/websites/piedsjaloux/production.nix b/modules/private/websites/piedsjaloux/production.nix new file mode 100644 index 00000000..e3bd2ddc --- /dev/null +++ b/modules/private/websites/piedsjaloux/production.nix | |||
@@ -0,0 +1,34 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | ||
2 | let | ||
3 | piedsjaloux = pkgs.callPackage ./builder.nix { | ||
4 | inherit (pkgs.webapps) piedsjaloux; | ||
5 | config = myconfig.env.websites.piedsjaloux.production; | ||
6 | apacheUser = config.services.httpd.Prod.user; | ||
7 | apacheGroup = config.services.httpd.Prod.group; | ||
8 | }; | ||
9 | |||
10 | cfg = config.myServices.websites.piedsjaloux.production; | ||
11 | in { | ||
12 | options.myServices.websites.piedsjaloux.production.enable = lib.mkEnableOption "enable PiedsJaloux's website in production"; | ||
13 | |||
14 | config = lib.mkIf cfg.enable { | ||
15 | secrets.keys = piedsjaloux.keys; | ||
16 | services.webstats.sites = [ { name = "piedsjaloux.fr"; } ]; | ||
17 | |||
18 | systemd.services.phpfpm-piedsjaloux_prod.after = lib.mkAfter piedsjaloux.phpFpm.serviceDeps; | ||
19 | systemd.services.phpfpm-piedsjaloux_prod.wants = piedsjaloux.phpFpm.serviceDeps; | ||
20 | systemd.services.phpfpm-piedsjaloux_prod.preStart = lib.mkAfter piedsjaloux.phpFpm.preStart; | ||
21 | services.phpfpm.poolConfigs.piedsjaloux_prod = piedsjaloux.phpFpm.pool; | ||
22 | system.activationScripts.piedsjaloux_prod = piedsjaloux.activationScript; | ||
23 | myServices.websites.webappDirs."${piedsjaloux.apache.webappName}" = piedsjaloux.app.webRoot; | ||
24 | services.websites.production.modules = piedsjaloux.apache.modules; | ||
25 | services.websites.production.vhostConfs.piedsjaloux = { | ||
26 | certName = "piedsjaloux"; | ||
27 | certMainHost = "piedsjaloux.fr"; | ||
28 | hosts = [ "piedsjaloux.fr" "www.piedsjaloux.fr" ]; | ||
29 | root = piedsjaloux.apache.root; | ||
30 | extraConfig = [ piedsjaloux.apache.vhostConf ]; | ||
31 | }; | ||
32 | }; | ||
33 | } | ||
34 | |||