Added `openFirewall` option to `rustdesk-server` service to simplify network setup.
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
services.rustdesk-server.enable = true;
|
|
services.rustdesk-server.signal.relayHosts = [ "rustdesk.hoyer.world" ];
|
|
services.rustdesk-server.openFirewall = true;
|
|
/*
|
|
services.nginx.virtualHosts."rustdesk.hoyer.world" = {
|
|
enableACME = false;
|
|
useACMEHost = "hoyer.world";
|
|
forceSSL = true;
|
|
locations = {
|
|
"/ws/id" = {
|
|
extraConfig = ''
|
|
proxy_pass http://localhost:21118;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
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;
|
|
'';
|
|
};
|
|
"/ws/relay" = {
|
|
extraConfig = ''
|
|
proxy_pass http://localhost:21119;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
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;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
*/
|
|
}
|