]>
Commit | Line | Data |
---|---|---|
83e79a89 | 1 | { config, lib, pkgs, ... }: |
3f453c7d IB |
2 | let |
3 | cfg = config.myServices.websites.tools.im; | |
4 | in | |
5 | { | |
6 | options.myServices.websites.tools.im = { | |
7 | enable = lib.mkEnableOption "enable im website"; | |
8 | }; | |
9 | ||
10 | config = lib.mkIf cfg.enable { | |
11 | services.websites.env.tools.vhostConfs.im = { | |
12 | certName = "eldiron"; | |
13 | addToCerts = true; | |
14 | hosts = ["im.immae.fr"]; | |
15 | root = ./www; | |
16 | extraConfig = [ | |
17 | '' | |
83e79a89 | 18 | Alias /glowing-bear ${pkgs.glowing-bear} |
3f453c7d IB |
19 | Alias /converse ${./www}/converse.html |
20 | ProxyPreserveHost On | |
21 | <Location "/bosh"> | |
22 | ProxyPass http://localhost:5280/bosh | |
23 | ProxyPassReverse http://localhost:5280/bosh | |
24 | </Location> | |
25 | <Location "/ws"> | |
26 | ProxyPass ws://localhost:5280/ws | |
27 | </Location> | |
28 | ProxyPass /upload http://localhost:5280/upload | |
29 | ProxyPassReverse /upload http://localhost:5280/upload | |
30 | ProxyPass /admin http://localhost:5280/admin | |
31 | ProxyPassReverse /admin http://localhost:5280/admin | |
32 | ProxyPass /api http://localhost:5280/api | |
33 | ProxyPassReverse /api http://localhost:5280/api | |
83e79a89 IB |
34 | <Directory ${pkgs.glowing-bear}> |
35 | AllowOverride none | |
36 | Require all granted | |
37 | </Directory> | |
3f453c7d IB |
38 | '' |
39 | ]; | |
40 | }; | |
41 | }; | |
42 | } |