fix(nginx): proxied listen

This commit is contained in:
arcnmx 2024-04-29 12:01:35 -07:00
parent f2c7178486
commit f9b02a03a4
18 changed files with 185 additions and 90 deletions

View file

@ -10,7 +10,10 @@ _: {
exports = {
services = {
sshd.enable = true;
nginx.enable = true;
nginx = {
enable = true;
ports.proxied.enable = true;
};
unifi.enable = true;
mosquitto.enable = true;
dnsmasq.enable = true;

View file

@ -18,18 +18,13 @@ in {
];
services.cloudflared = let
inherit (nginx) virtualHosts defaultHTTPListenPort;
inherit (nginx) virtualHosts;
tunnelId = "28bcd3fc-3467-4997-806b-546ba9995028";
localNginx = "http://localhost:${toString defaultHTTPListenPort}";
in {
tunnels.${tunnelId} = {
default = "http_status:404";
credentialsFile = config.sops.secrets.cloudflared-tunnel-utsuho.path;
ingress = {
${virtualHosts.unifi.serverName} = {
service = localNginx;
};
};
ingress = virtualHosts.unifi.proxied.cloudflared.getIngress {};
};
};