diff --git a/configuration.org b/configuration.org index 1ececb9..8ce415a 100755 --- a/configuration.org +++ b/configuration.org @@ -1201,8 +1201,8 @@ systemd = { description = "update DNS of my websites"; wantedBy = [ "default.target" ]; path = [ - pkgs.curl pkgs.bash + pkgs.nix jawzUpdateDns ]; serviceConfig = { @@ -1235,7 +1235,7 @@ systemd = { OnCalendar = "*:0/10"; }; }; - update_dns = { + update-dns = { enable = true; description = "update DNS of my websites"; wantedBy = [ "timers.target" ]; diff --git a/nginx.nix b/nginx.nix index 7875cd9..94accb0 100755 --- a/nginx.nix +++ b/nginx.nix @@ -6,6 +6,7 @@ let localhost = "127.0.0.1"; jellyfinPort = "8096"; + radarrPort = 7878; newflixPort = 8897; shioriPort = 9001; flamePort = 5005; @@ -13,7 +14,6 @@ let lidarrPort = 8686; bazarrPort = 6767; sonarrPort = 8989; - radarrPort = 7878; prowlarrPort = 9696; vaultPort = 9666; searxPort = 8080; @@ -79,10 +79,24 @@ in { http2 = true; }; proxy = port: - base { - "/".proxyPass = "http://${localhost}:" + toString (port) + "/"; + base { "/".proxyPass = "http://${localhost}:${toString (port)}/"; }; + proxyArr = port: + proxy port // { + extraConfig = '' + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + + proxy_redirect off; + proxy_http_version 1.1; + ''; }; in { + "movies.servidos.lat" = proxyArr radarrPort // { }; + "indexer.servidos.lat" = proxyArr prowlarrPort // { }; "newflix.servidos.lat" = proxy newflixPort // { }; "library.servidos.lat" = proxy kavitaPort // { }; "bookmarks.servidos.lat" = proxy shioriPort // { }; @@ -91,8 +105,6 @@ in { "music.servidos.lat" = proxy lidarrPort // { }; "subs.servidos.lat" = proxy bazarrPort // { }; "series.servidos.lat" = proxy sonarrPort // { }; - "movies.servidos.lat" = proxy radarrPort // { }; - "indexer.servidos.lat" = proxy prowlarrPort // { }; "vault.servidos.lat" = proxy vaultPort // { }; "searx.servidos.lat" = proxy searxPort // { }; "flix.servidos.lat" = {