diff --git a/hosts/crossbox/default.nix b/hosts/crossbox/default.nix index b8202c8..80ef65d 100644 --- a/hosts/crossbox/default.nix +++ b/hosts/crossbox/default.nix @@ -15,6 +15,7 @@ in ./forgejo.nix ./radicale.nix ./ollama.nix + ./rustdesk.nix # ./llama-server.nix # disabled: source build broken (LLVM 22 vs 19 mismatch in strix-halo overlay) # ./docuseal.nix ]; diff --git a/hosts/crossbox/nginx.nix b/hosts/crossbox/nginx.nix index 2e2bcf7..efc76a2 100644 --- a/hosts/crossbox/nginx.nix +++ b/hosts/crossbox/nginx.nix @@ -117,11 +117,12 @@ in }; # LM Studio with Bearer token authentication + # Proxies https://lmstudio.binning.net/v1 to http://localhost:1234/v1. "lmstudio.binning.net" = { forceSSL = true; - sslCertificate = "/srv/nginx/binning.net.pem"; - sslCertificateKey = "/srv/nginx/binning.net.key.pem"; + sslCertificate = "/srv/nginx/binning.net.pem"; + sslCertificateKey = "/srv/nginx/binning.net.key.pem"; locations."/" = { extraConfig = '' @@ -133,8 +134,9 @@ in return 403 "Forbidden: Invalid API key\n"; } - # Proxy to LM Studio - proxy_pass http://localhost:1234; + # Proxy to LM Studio (running on port 1234) + # Note: The trailing slash is important - it preserves the /v1 path + proxy_pass http://localhost:1234/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -165,8 +167,8 @@ in forceSSL = true; #enableACME = true; - sslCertificate = "/srv/nginx/binning.net.pem"; - sslCertificateKey = "/srv/nginx/binning.net.key.pem"; + sslCertificate = "/srv/nginx/binning.net.pem"; + sslCertificateKey = "/srv/nginx/binning.net.key.pem"; locations."/" = { proxyPass = "http://127.0.0.1:3000"; @@ -179,8 +181,8 @@ in forceSSL = true; #enableACME = true; - sslCertificate = "/srv/nginx/binning.net.pem"; - sslCertificateKey = "/srv/nginx/binning.net.key.pem"; + sslCertificate = "/srv/nginx/binning.net.pem"; + sslCertificateKey = "/srv/nginx/binning.net.key.pem"; locations."/" = { proxyPass = "http://127.0.0.1:5232"; @@ -204,6 +206,20 @@ in proxyWebsockets = true; }; }; + + # RustDesk + "rustdesk.binning.net" = { + forceSSL = true; + + #enableACME = true; + sslCertificate = "/srv/nginx/binning.net.pem"; + sslCertificateKey = "/srv/nginx/binning.net.key.pem"; + + locations."/" = { + proxyPass = "http://127.0.0.1:16484"; + proxyWebsockets = true; + }; + }; }; }; diff --git a/hosts/crossbox/rustdesk.nix b/hosts/crossbox/rustdesk.nix new file mode 100644 index 0000000..8522369 --- /dev/null +++ b/hosts/crossbox/rustdesk.nix @@ -0,0 +1,24 @@ +{ config, pkgs, lib, ... }: + +{ + services.rustdesk = { + enable = true; + server = { + port = 16484; + # Optional: Set a password for the server + # password = "your-password"; + }; + client = { + # Optional: Set a password for the client + # password = "your-password"; + }; + }; + + # Open firewall port for RustDesk + networking.firewall.allowedTCPPorts = [ 16484 ]; + + # Install RustDesk + environment.systemPackages = with pkgs; [ + rustdesk + ]; +} \ No newline at end of file