From 79096d8214bf31d5eea36f6c2192e39bbe6b6837 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sat, 13 Jan 2024 17:22:56 -0600 Subject: [PATCH] added vocechat, disabled samba, etc --- server/configuration.org | 2 +- server/docker.nix | 7 +++++++ server/nginx.nix | 25 ++++++++++++++++++++++++- server/servers.nix | 10 +++++----- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/server/configuration.org b/server/configuration.org index eba76f5..b0ae1b2 100644 --- a/server/configuration.org +++ b/server/configuration.org @@ -843,7 +843,7 @@ services = { }; samba-wsdd.enable = true; samba = { - enable = true; + enable = false; securityType = "user"; openFirewall = true; extraConfig = '' diff --git a/server/docker.nix b/server/docker.nix index 36b4da5..030f010 100644 --- a/server/docker.nix +++ b/server/docker.nix @@ -41,6 +41,13 @@ # }; # extraOptions = [ "--cap-add" "MKNOD" ]; # }; + vocechat = { + image = "privoce/vocechat-server:latest"; + ports = [ "3001:3000" ]; + volumes = + [ "/var/lib/docker-configs/vocechat:/home/vocechat-server/data" ]; + environment = { TZ = "America/Mexico_City"; }; + }; ryot = { image = "ghcr.io/ignisda/ryot:latest"; ports = [ "8765:8000" ]; diff --git a/server/nginx.nix b/server/nginx.nix index c3f0c2d..704c74c 100644 --- a/server/nginx.nix +++ b/server/nginx.nix @@ -81,7 +81,6 @@ in { "maloja.${domain}" = proxy malojaPort // { }; "qampqwn4wprhqny8h8zj.${domain}" = proxy secretFlamePort // { }; "xfwmrle6h6skqujbeizw.${domain}" = proxy qbitPort // { }; - "dontcancelmeplz.${domain}" = proxy darkwirePort // { }; "audiobooks.${domain}" = base { "/" = { proxyPass = "http://${localhost}:${toString (audiobookPort)}"; @@ -98,6 +97,30 @@ in { ''; }; }; + "dontcancelmeplz.${domain}" = base { + "/" = { + proxyPass = "http://${localhost}:${toString (darkwirePort)}"; + proxyWebsockets = true; + extraConfig = '' + # Ensuring it can use websockets + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + 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 http; + proxy_redirect http:// $scheme://; + + # The proxy must preserve the host because gotify verifies the host with the origin + # for WebSocket connections + proxy_set_header Host $host; + + # These sets the timeout so that the websocket can stay alive + proxy_connect_timeout 1m; + proxy_send_timeout 1m; + proxy_read_timeout 1m; + ''; + }; + }; # "flix.${domain}" = { # forceSSL = true; # enableACME = true; diff --git a/server/servers.nix b/server/servers.nix index 403811f..6af9baf 100644 --- a/server/servers.nix +++ b/server/servers.nix @@ -92,11 +92,11 @@ in { MICROBIN_ENCRYPTION_SERVER_SIDE = true; }; }; - # audiobookshelf = { - # enable = true; - # group = "piracy"; - # port = 5687; - # }; + audiobookshelf = { + enable = true; + group = "piracy"; + port = 5687; + }; paperless = { enable = true; address = "0.0.0.0";