diff options
Diffstat (limited to '')
-rw-r--r-- | instance-options.nix | 13 | ||||
-rw-r--r-- | workadventure-nix.nix | 4 | ||||
-rw-r--r-- | workadventure.nix | 12 |
3 files changed, 21 insertions, 8 deletions
diff --git a/instance-options.nix b/instance-options.nix index 6a1d2dc..c685693 100644 --- a/instance-options.nix +++ b/instance-options.nix @@ -57,6 +57,19 @@ in type = types.nullOr types.str; description = "The url to the default map, which will be loaded if none is given in the url. Must be a reachable url relative to the public map url defined in `maps.url`."; }; + + settings = mkOption { + default = {}; + type = types.attrsOf types.str; + description = "Settings for workadventure's frontend."; + example = { + stunServer = "stun:some.stunserver:3478"; + turnServer = "turn:some.turnserver"; + turnUser = "user"; + turnPassword = "password"; + }; + + }; urls = { api = mkOption { diff --git a/workadventure-nix.nix b/workadventure-nix.nix index 4c515cb..ffd028f 100644 --- a/workadventure-nix.nix +++ b/workadventure-nix.nix @@ -8,8 +8,8 @@ let src = pkgs.fetchgit { url = "https://gitlab.infra4future.de/stuebinm/workadventure-nix"; - rev = "71ed23142c5ab6db05263b6e5c52f8fab1d84425"; - sha256 = "0g20rzaxp5md26hc3dig4hhp296bd45n1zi3b67a8q0l290ydn2g"; + rev = "c46949747779b5e679774ceb23a530ed4736c52b"; + sha256 = "1z6qd7bjrc7map2nj3yzwqyvr16vk29fy08pdc9vvd4yid2lywv7"; }; # Use a fixed-point operator to build a nixpkgs-like structure that contains all diff --git a/workadventure.nix b/workadventure.nix index 02f9803..1050023 100644 --- a/workadventure.nix +++ b/workadventure.nix @@ -70,12 +70,12 @@ let frontPackage = mapAttrs (instanceName: instanceConfig: instanceConfig.frontend.package.override { - environment = { - API_URL = instanceConfig.frontend.urls.api; - UPLOADER_URL = instanceConfig.frontend.urls.uploader; - ADMIN_URL = instanceConfig.frontend.urls.admin; - MAPS_URL = instanceConfig.frontend.urls.maps; - } // (if instanceConfig.frontend.defaultMap == null then {} else { DEFAULT_MAP_URL = instanceConfig.frontend.defaultMap; }); + settings = { + apiUrl = instanceConfig.frontend.urls.api; + uploaderUrl = instanceConfig.frontend.urls.uploader; + adminUrl = instanceConfig.frontend.urls.admin; + mapsUrl = instanceConfig.frontend.urls.maps; + } // instanceConfig.frontend.settings; } ) cfg.instances; |