summaryrefslogtreecommitdiff
path: root/modules/private/websites/aten/production.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/websites/aten/production.nix')
-rw-r--r--modules/private/websites/aten/production.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/private/websites/aten/production.nix b/modules/private/websites/aten/production.nix
new file mode 100644
index 00000000..7a4adb5a
--- /dev/null
+++ b/modules/private/websites/aten/production.nix
@@ -0,0 +1,34 @@
1{ lib, pkgs, config, myconfig, ... }:
2let
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;
11in {
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
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;
22 system.activationScripts.aten_prod = aten.activationScript;
23 myServices.websites.webappDirs."${aten.apache.webappName}" = aten.app.webRoot;
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 };
32 };
33}
34