diff options
Diffstat (limited to 'modules/private/websites/tools/im/default.nix')
-rw-r--r-- | modules/private/websites/tools/im/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/modules/private/websites/tools/im/default.nix b/modules/private/websites/tools/im/default.nix new file mode 100644 index 0000000..9744d8e --- /dev/null +++ b/modules/private/websites/tools/im/default.nix | |||
@@ -0,0 +1,37 @@ | |||
1 | { config, lib, ... }: | ||
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 | '' | ||
18 | Alias /converse ${./www}/converse.html | ||
19 | ProxyPreserveHost On | ||
20 | <Location "/bosh"> | ||
21 | ProxyPass http://localhost:5280/bosh | ||
22 | ProxyPassReverse http://localhost:5280/bosh | ||
23 | </Location> | ||
24 | <Location "/ws"> | ||
25 | ProxyPass ws://localhost:5280/ws | ||
26 | </Location> | ||
27 | ProxyPass /upload http://localhost:5280/upload | ||
28 | ProxyPassReverse /upload http://localhost:5280/upload | ||
29 | ProxyPass /admin http://localhost:5280/admin | ||
30 | ProxyPassReverse /admin http://localhost:5280/admin | ||
31 | ProxyPass /api http://localhost:5280/api | ||
32 | ProxyPassReverse /api http://localhost:5280/api | ||
33 | '' | ||
34 | ]; | ||
35 | }; | ||
36 | }; | ||
37 | } | ||