diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-18 10:49:00 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-18 10:49:00 +0200 |
commit | f8026b6e4c869aa108f6361c8ccd50890657994d (patch) | |
tree | 57cb311e520933bd2ab6ccbae05f2913799eb49e /modules/private/websites/aten/integration.nix | |
parent | 4aac110f17f0528d90510eec00c9a8df60bcf04f (diff) | |
download | Nix-f8026b6e4c869aa108f6361c8ccd50890657994d.tar.gz Nix-f8026b6e4c869aa108f6361c8ccd50890657994d.tar.zst Nix-f8026b6e4c869aa108f6361c8ccd50890657994d.zip |
Move personal websites to modules
Diffstat (limited to 'modules/private/websites/aten/integration.nix')
-rw-r--r-- | modules/private/websites/aten/integration.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/private/websites/aten/integration.nix b/modules/private/websites/aten/integration.nix new file mode 100644 index 0000000..790c5a9 --- /dev/null +++ b/modules/private/websites/aten/integration.nix | |||
@@ -0,0 +1,34 @@ | |||
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 | services.myPhpfpm.preStart.aten_dev = aten.phpFpm.preStart; | ||
17 | services.myPhpfpm.serviceDependencies.aten_dev = aten.phpFpm.serviceDeps; | ||
18 | services.myPhpfpm.poolConfigs.aten_dev = aten.phpFpm.pool; | ||
19 | system.activationScripts.aten_dev = aten.activationScript; | ||
20 | system.extraSystemBuilderCmds = '' | ||
21 | mkdir -p $out/webapps | ||
22 | ln -s ${aten.app.webRoot} $out/webapps/${aten.apache.webappName} | ||
23 | ''; | ||
24 | services.websites.integration.modules = aten.apache.modules; | ||
25 | services.websites.integration.vhostConfs.aten = { | ||
26 | certName = "eldiron"; | ||
27 | addToCerts = true; | ||
28 | hosts = [ "dev.aten.pro" ]; | ||
29 | root = aten.apache.root; | ||
30 | extraConfig = [ aten.apache.vhostConf ]; | ||
31 | }; | ||
32 | }; | ||
33 | } | ||
34 | |||