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/florian/app.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/florian/app.nix')
-rw-r--r-- | modules/private/websites/florian/app.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/private/websites/florian/app.nix b/modules/private/websites/florian/app.nix new file mode 100644 index 0000000..08506e1 --- /dev/null +++ b/modules/private/websites/florian/app.nix | |||
@@ -0,0 +1,38 @@ | |||
1 | { lib, pkgs, config, myconfig, ... }: | ||
2 | let | ||
3 | adminer = pkgs.callPackage ../commons/adminer.nix {}; | ||
4 | |||
5 | tellesflorian = pkgs.callPackage ./builder_app.nix { | ||
6 | inherit (pkgs.webapps) tellesflorian; | ||
7 | config = myconfig.env.websites.tellesflorian.integration; | ||
8 | apacheUser = config.services.httpd.Inte.user; | ||
9 | apacheGroup = config.services.httpd.Inte.group; | ||
10 | }; | ||
11 | |||
12 | cfg = config.myServices.websites.florian.app; | ||
13 | in { | ||
14 | options.myServices.websites.florian.app.enable = lib.mkEnableOption "enable Florian's app in integration"; | ||
15 | |||
16 | config = lib.mkIf cfg.enable { | ||
17 | secrets.keys = tellesflorian.keys; | ||
18 | services.myPhpfpm.preStart.tellesflorian_dev = tellesflorian.phpFpm.preStart; | ||
19 | services.myPhpfpm.serviceDependencies.tellesflorian_dev = tellesflorian.phpFpm.serviceDeps; | ||
20 | services.myPhpfpm.poolConfigs.tellesflorian_dev = tellesflorian.phpFpm.pool; | ||
21 | system.activationScripts.tellesflorian_dev = tellesflorian.activationScript; | ||
22 | system.extraSystemBuilderCmds = '' | ||
23 | mkdir -p $out/webapps | ||
24 | ln -s ${tellesflorian.app.webRoot} $out/webapps/${tellesflorian.apache.webappName} | ||
25 | ''; | ||
26 | services.websites.integration.modules = adminer.apache.modules ++ tellesflorian.apache.modules; | ||
27 | services.websites.integration.vhostConfs.tellesflorian = { | ||
28 | certName = "eldiron"; | ||
29 | addToCerts = true; | ||
30 | hosts = ["app.tellesflorian.com" ]; | ||
31 | root = tellesflorian.apache.root; | ||
32 | extraConfig = [ | ||
33 | tellesflorian.apache.vhostConf | ||
34 | adminer.apache.vhostConf | ||
35 | ]; | ||
36 | }; | ||
37 | }; | ||
38 | } | ||