{ 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; # }; }; }; }; }