]>
Commit | Line | Data |
---|---|---|
f8026b6e IB |
1 | { lib, pkgs, config, myconfig, ... }: |
2 | let | |
3 | aten = pkgs.callPackage ./builder.nix { | |
4 | inherit (pkgs.webapps) aten; | |
5 | config = myconfig.env.websites.aten.production; | |
6 | apacheUser = config.services.httpd.Prod.user; | |
7 | apacheGroup = config.services.httpd.Prod.group; | |
8 | }; | |
9 | ||
10 | cfg = config.myServices.websites.aten.production; | |
11 | in { | |
12 | options.myServices.websites.aten.production.enable = lib.mkEnableOption "enable Aten's website in production"; | |
13 | ||
14 | config = lib.mkIf cfg.enable { | |
15 | secrets.keys = aten.keys; | |
16 | services.webstats.sites = [ { name = "aten.pro"; } ]; | |
17 | ||
f40f5b23 IB |
18 | systemd.services.phpfpm-aten_prod.preStart = lib.mkAfter aten.phpFpm.preStart; |
19 | systemd.services.phpfpm-aten_prod.after = lib.mkAfter aten.phpFpm.serviceDeps; | |
20 | systemd.services.phpfpm-aten_prod.wants = aten.phpFpm.serviceDeps; | |
21 | services.phpfpm.poolConfigs.aten_prod = aten.phpFpm.pool; | |
f8026b6e | 22 | system.activationScripts.aten_prod = aten.activationScript; |
4288c2f2 | 23 | myServices.websites.webappDirs."${aten.apache.webappName}" = aten.app.webRoot; |
f8026b6e IB |
24 | services.websites.production.modules = aten.apache.modules; |
25 | services.websites.production.vhostConfs.aten = { | |
26 | certName = "aten"; | |
27 | certMainHost = "aten.pro"; | |
28 | hosts = [ "aten.pro" "www.aten.pro" ]; | |
29 | root = aten.apache.root; | |
30 | extraConfig = [ aten.apache.vhostConf ]; | |
31 | }; | |
17f6eae9 IB |
32 | services.websites.production.watchPaths = [ |
33 | "/var/secrets/webapps/${aten.app.environment}-aten" | |
34 | ]; | |
f8026b6e IB |
35 | }; |
36 | } |