Compare commits

..

View file

@ -1,27 +1,24 @@
{ homelab, lib, ... }: let { homelab, lib, ... }: let
d = dest: { inherit dest; auth = false; };
da = dest: { inherit dest; auth = true; };
base = "proxy.${homelab.domain}"; base = "proxy.${homelab.domain}";
hosts = { hosts = {
"server" = d "https://server.dns.${homelab.domain}:8006"; "server" = { dest = "https://server.dns.${homelab.domain}:8006"; auth = false; };
"router" = d "http://router.dns.${homelab.domain}:80"; "router" = { dest = "http://router.dns.${homelab.domain}:80"; auth = false; };
"home" = d "http://home.dns.${homelab.domain}:8123"; "home" = { dest = "http://home.dns.${homelab.domain}:8123"; auth = false; };
"containers" = da "http://localhost:5001"; "containers" = { dest = "http://localhost:5001"; auth = true; };
"dns" = da "http://localhost:8088"; "dynamic" = { dest = "http://localhost:8082"; auth = true; };
"dns" = { dest = "http://localhost:8088"; auth = true; };
"gallery" = d "http://localhost:2283"; "gallery" = { dest = "http://localhost:2283"; auth = false; };
"dynamic" = d "http://localhost:8082"; "remote" = { dest = "http://localhost:8085"; auth = false; };
"remote" = d "http://localhost:8085"; "search" = { dest = "http://localhost:8091"; auth = false; };
"search" = d "http://localhost:8091"; "notify" = { dest = "http://localhost:8067"; auth = false; };
"notify" = d "http://localhost:8067"; "media" = { dest = "http://localhost:8096"; auth = false; };
"media" = d "http://localhost:8096"; "pass" = { dest = "http://localhost:8060"; auth = false; };
"pass" = d "http://localhost:8060"; "auth" = { dest = "http://localhost:1411"; auth = false; };
"auth" = d "http://localhost:1411"; "git" = { dest = "http://localhost:5080"; auth = false; };
"git" = d "http://localhost:5080"; "ai" = { dest = "http://localhost:8080"; auth = false; };
"ai" = d "http://localhost:8080"; "@" = { dest = "http://localhost:5070"; auth = false; };
"@" = d "http://localhost:5070";
}; };
redirects = { redirects = {
"www" = "https://proxy.${homelab.domain}"; "www" = "https://proxy.${homelab.domain}";
@ -104,7 +101,6 @@ in {
forwardedHeaders.trustedIPs = [ "127.0.0.1/32" ]; forwardedHeaders.trustedIPs = [ "127.0.0.1/32" ];
}; };
}; };
http.middlewares.auth.basicAuth.usersFile = "/var/lib/nginx/.htpasswd";
api = { api = {
dashboard = true; dashboard = true;
insecure = true; insecure = true;