summaryrefslogtreecommitdiff
path: root/hosts/chaski/services/exneuland.nix
diff options
context:
space:
mode:
authorstuebinm2022-01-18 09:43:24 +0100
committerstuebinm2022-01-20 13:19:44 +0100
commit0bcabe1c4b1dd74af233674dfa6c6ec3011ce2c0 (patch)
tree5c58943f99245ff7f745f50b46c34ae288c3e503 /hosts/chaski/services/exneuland.nix
parentdb83a406bc6e63289e47ff5d2228c08430832655 (diff)
restructuring directories
Diffstat (limited to 'hosts/chaski/services/exneuland.nix')
-rw-r--r--hosts/chaski/services/exneuland.nix58
1 files changed, 0 insertions, 58 deletions
diff --git a/hosts/chaski/services/exneuland.nix b/hosts/chaski/services/exneuland.nix
deleted file mode 100644
index 3ec3451..0000000
--- a/hosts/chaski/services/exneuland.nix
+++ /dev/null
@@ -1,58 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-let
- workadventure-nix = builtins.fetchGit {
- url = "https://stuebinm.eu/git/workadventure-nix";
- ref = "master";
- };
- wapkgs = import "${workadventure-nix.outPath}/wapkgs.nix" {
- inherit pkgs;
- lib = pkgs.lib;
- };
- frontdrv = wapkgs.workadventure-tcm.front.override {
- environment = {
- PUSHER_URL = "https://exneuland.stuebinm.eu/pusher";
- START_ROOM_URL = "/_/global/world.di.c3voc.de/maps/main.json";
- };
- };
- exneuland = import ../../../pkgs/exneuland.nix;
-in
-{
- services.nginx = {
- enable = true;
- recommendedProxySettings = false;
- virtualHosts."exneuland.stuebinm.eu" = {
- root = "${frontdrv}/dist";
- locations."/_/".tryFiles = "/index.html =404";
-
- locations."/pusher" = {
- proxyPass = "http://localhost:4000";
- proxyWebsockets = true;
- extraConfig = ''
- add_header Access-Control-Allow-Origin https://exneuland.stuebinm.eu;
- proxy_pass_request_headers on;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Host $http_host;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection $http_connection;
- '';
- };
-
- enableACME = true;
- forceSSL = true;
- };
- };
-
- systemd.services.exneuland = {
- wantedBy = [ "multi-user.target" ];
- after = [ "network.target" ];
- description = "exneuland backend for workadventure";
- serviceConfig = {
- ExecStart = "${exneuland}/bin/exneuland start";
- Restart = "always";
- };
- };
-}