0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-09 20:16:16 +03:00

nixos/tailscale-derper: drop nginx upstream to improve reliability (#377640)

This commit is contained in:
Sandro 2025-02-02 22:18:04 +01:00 committed by GitHub
commit b1b6a16499
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,16 +68,10 @@ in
services = { services = {
nginx = { nginx = {
enable = true; enable = true;
upstreams.tailscale-derper = {
servers."127.0.0.1:${toString cfg.port}" = { };
extraConfig = ''
keepalive 64;
'';
};
virtualHosts."${cfg.domain}" = { virtualHosts."${cfg.domain}" = {
addSSL = true; # this cannot be forceSSL as derper sends some information over port 80, too. addSSL = true; # this cannot be forceSSL as derper sends some information over port 80, too.
locations."/" = { locations."/" = {
proxyPass = "http://tailscale-derper"; proxyPass = "http://127.0.0.1:${toString cfg.port}";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = '' extraConfig = ''
keepalive_timeout 0; keepalive_timeout 0;