summaryrefslogtreecommitdiff
path: root/abbenay/exneuland.nix
blob: 1c07355c5ee70eed2e0f11e05c23b8394fef99d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ config, lib, pkgs, ... }:

{
  services.nginx = {
    enable = true;

    virtualHosts.localhost = {
      root = "/tmp/workadventure-xce/result/dist";
      locations = {
        "/_/" = {
          tryFiles = "/index.html =404";
        };

        "/pusher/" = {
          proxyPass = "http://localhost:4000";
          proxyWebsockets = true;
        };

        # "/maps/" = mkIf instanceConfig.nginx.maps.serve {
        #   alias = if instanceConfig.nginx.maps.path == null
        #           then instanceConfig.packageset.maps.outPath + "/workadventuremaps"
        #           else instanceConfig.nginx.maps.path;
        # };

      };

    };
  };
}