Add RustDesk service and nginx configuration
This commit is contained in:
parent
651cc2be63
commit
0a9981870d
3 changed files with 49 additions and 8 deletions
|
|
@ -15,6 +15,7 @@ in
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
./radicale.nix
|
./radicale.nix
|
||||||
./ollama.nix
|
./ollama.nix
|
||||||
|
./rustdesk.nix
|
||||||
# ./llama-server.nix # disabled: source build broken (LLVM 22 vs 19 mismatch in strix-halo overlay)
|
# ./llama-server.nix # disabled: source build broken (LLVM 22 vs 19 mismatch in strix-halo overlay)
|
||||||
# ./docuseal.nix
|
# ./docuseal.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -117,11 +117,12 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# LM Studio with Bearer token authentication
|
# LM Studio with Bearer token authentication
|
||||||
|
# Proxies https://lmstudio.binning.net/v1 to http://localhost:1234/v1.
|
||||||
"lmstudio.binning.net" = {
|
"lmstudio.binning.net" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
sslCertificate = "/srv/nginx/binning.net.pem";
|
sslCertificate = "/srv/nginx/binning.net.pem";
|
||||||
sslCertificateKey = "/srv/nginx/binning.net.key.pem";
|
sslCertificateKey = "/srv/nginx/binning.net.key.pem";
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
@ -133,8 +134,9 @@ in
|
||||||
return 403 "Forbidden: Invalid API key\n";
|
return 403 "Forbidden: Invalid API key\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Proxy to LM Studio
|
# Proxy to LM Studio (running on port 1234)
|
||||||
proxy_pass http://localhost:1234;
|
# Note: The trailing slash is important - it preserves the /v1 path
|
||||||
|
proxy_pass http://localhost:1234/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
@ -165,8 +167,8 @@ in
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
#enableACME = true;
|
#enableACME = true;
|
||||||
sslCertificate = "/srv/nginx/binning.net.pem";
|
sslCertificate = "/srv/nginx/binning.net.pem";
|
||||||
sslCertificateKey = "/srv/nginx/binning.net.key.pem";
|
sslCertificateKey = "/srv/nginx/binning.net.key.pem";
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:3000";
|
proxyPass = "http://127.0.0.1:3000";
|
||||||
|
|
@ -179,8 +181,8 @@ in
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
#enableACME = true;
|
#enableACME = true;
|
||||||
sslCertificate = "/srv/nginx/binning.net.pem";
|
sslCertificate = "/srv/nginx/binning.net.pem";
|
||||||
sslCertificateKey = "/srv/nginx/binning.net.key.pem";
|
sslCertificateKey = "/srv/nginx/binning.net.key.pem";
|
||||||
|
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:5232";
|
proxyPass = "http://127.0.0.1:5232";
|
||||||
|
|
@ -204,6 +206,20 @@ in
|
||||||
proxyWebsockets = true;
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
24
hosts/crossbox/rustdesk.nix
Normal file
24
hosts/crossbox/rustdesk.nix
Normal file
|
|
@ -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
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue