Compare commits

..

No commits in common. "simplify-caddy" and "main" have entirely different histories.

View file

@ -9,39 +9,59 @@
"d '/data/srv/www/os/download/' 0750 hakkonaut hakkonaut - -" "d '/data/srv/www/os/download/' 0750 hakkonaut hakkonaut - -"
]; ];
services.caddy = services.caddy = {
let enable = lib.mkForce true;
mkRevProxyVhost = addr: { group = "hakkonaut";
logFormat = lib.mkForce "output discard"; email = "admins@pub.solar";
extraConfig = "reverse_proxy ${addr}"; enableReload = true;
globalConfig = lib.mkForce ''
grace_period 60s
'';
virtualHosts = {
"ci.pub.solar" = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
reverse_proxy :4000
'';
}; };
in "flora-6.pub.solar" = {
{ logFormat = lib.mkForce ''
enable = lib.mkForce true; output discard
group = "hakkonaut"; '';
email = "admins@pub.solar"; extraConfig = ''
enableReload = true; basicauth * {
hakkonaut $2a$14$mmIAy/Ezm6YGohUtXa2mWeW6Bcw1MQXPhrRbz14jAD2iUu3oob/t.
globalConfig = lib.mkForce '' }
grace_period 60s reverse_proxy :${toString config.services.loki.configuration.server.http_listen_port}
''; '';
};
virtualHosts = { "alerts.pub.solar" = {
"ci.pub.solar" = mkRevProxyVhost ":4000"; logFormat = lib.mkForce ''
"alerts.pub.solar" = mkRevProxyVhost "10.7.6.2:${toString config.services.prometheus.alertmanager.port}"; output discard
"grafana.pub.solar" = mkRevProxyVhost ":${toString config.services.grafana.settings.server.http_port}"; '';
"obs-portal.pub.solar" = mkRevProxyVhost "obs-portal.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.int.greenbaum.zone:3000"; extraConfig = ''
"flora-6.pub.solar" = { reverse_proxy 10.7.6.2:${toString config.services.prometheus.alertmanager.port}
logFormat = lib.mkForce "output discard"; '';
extraConfig = '' };
basicauth * { "grafana.pub.solar" = {
hakkonaut $2a$14$mmIAy/Ezm6YGohUtXa2mWeW6Bcw1MQXPhrRbz14jAD2iUu3oob/t. logFormat = lib.mkForce ''
} output discard
reverse_proxy :${toString config.services.loki.configuration.server.http_listen_port} '';
''; extraConfig = ''
}; reverse_proxy :${toString config.services.grafana.settings.server.http_port}
'';
};
"obs-portal.pub.solar" = {
logFormat = lib.mkForce ''
output discard
'';
extraConfig = ''
reverse_proxy obs-portal.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.int.greenbaum.zone:3000
'';
}; };
}; };
};
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
} }