]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - modules/private/websites/tools/visio/default.nix
WIP upgrade
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / visio / default.nix
CommitLineData
bdaca01e
IB
1{ lib, pkgs, config, ... }:
2let
a3ac9c84 3 port = config.myEnv.ports.galene_port;
bdaca01e
IB
4 cfg = config.myServices.websites.tools.visio;
5in {
6 options.myServices.websites.tools.visio = {
7 enable = lib.mkEnableOption "enable visio website";
8 };
9
10 config = lib.mkIf cfg.enable {
bdaca01e
IB
11 services.galene = {
12 enable = true;
13 httpPort = port;
14 insecure = true;
15 # hack to bypass module's limitations
a3ac9c84 16 dataDir = "/var/lib/galene/data -http localhost:${builtins.toString port}";
bdaca01e
IB
17 };
18 services.websites.env.tools.vhostConfs.visio = {
19 certName = "eldiron";
20 addToCerts = true;
21 hosts = ["visio.immae.eu" ];
22 root = null;
23 extraConfig = [
24 ''
25 ProxyPass /ws ws://localhost:${builtins.toString port}/ws
26 ProxyPassReverse /ws ws://localhost:${builtins.toString port}/ws
27
28 ProxyPass / http://localhost:${builtins.toString port}/
29 ProxyPassReverse / http://localhost:${builtins.toString port}/
30
31 ProxyPreserveHost On
32 ''
33 ];
34 };
35
36 };
37}
38