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