diff --git a/systems/x86_64-linux/mx/default.nix b/systems/x86_64-linux/mx/default.nix index b860191..adff95a 100644 --- a/systems/x86_64-linux/mx/default.nix +++ b/systems/x86_64-linux/mx/default.nix @@ -14,12 +14,10 @@ ./nginx.nix ./postgresql.nix ./rspamd.nix + ./rustdesk.nix ./users.nix ]; - services.rustdesk-server.enable = true; - services.rustdesk-server.signal.relayHosts = [ "mx.surfsite.org" ]; - metacfg = { base.enable = true; nix.enable = true; diff --git a/systems/x86_64-linux/mx/rustdesk.nix b/systems/x86_64-linux/mx/rustdesk.nix new file mode 100644 index 0000000..b45377e --- /dev/null +++ b/systems/x86_64-linux/mx/rustdesk.nix @@ -0,0 +1,26 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + services.rustdesk-server.enable = true; + services.rustdesk-server.signal.relayHosts = [ "mx.surfsite.org" ]; + + services.nginx.virtualHosts."rustdesk.hoyer.world" = { + enableACME = false; + useACMEHost = "hoyer.world"; + forceSSL = false; + locations = { + "/ws/id" = { + proxyPass = "http://127.0.0.1:21118"; + proxyWebsockets = true; + }; + "/ws/relay" = { + proxyPass = "http://127.0.0.1:21119"; + proxyWebsockets = true; + }; + }; + }; +}