nixos-servers/services/http-proxy/proxy.nix
Torjus Håkestad e366a05204
Some checks failed
Run nix flake check / flake-check (push) Failing after 9m1s
Periodic flake update / flake-update (push) Successful in 1m30s
Fix caddy logging
2025-01-28 00:49:22 +01:00

96 lines
2.2 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs, ... }:
{
services.caddy = {
enable = true;
package = pkgs.unstable.caddy;
configFile = pkgs.writeText "Caddyfile" ''
{
acme_ca https://ca.home.2rjus.net/acme/acme/directory
}
nzbget.home.2rjus.net {
log {
output file /var/log/caddy/nzbget.log {
mode 644
}
}
reverse_proxy http://nzbget-jail.home.2rjus.net:6789
}
radarr.home.2rjus.net {
log {
output file /var/log/caddy/radarr.log {
mode 644
}
}
reverse_proxy http://radarr-jail.home.2rjus.net:7878
}
sonarr.home.2rjus.net {
log {
output file /var/log/caddy/sonarr.log {
mode 644
}
}
reverse_proxy http://sonarr-jail.home.2rjus.net:8989
}
ha.home.2rjus.net {
log {
output file /var/log/caddy/ha.log {
mode 644
}
}
reverse_proxy http://ha1.home.2rjus.net:8123
}
z2m.home.2rjus.net {
log {
output file /var/log/caddy/z2m.log {
mode 644
}
}
reverse_proxy http://ha1.home.2rjus.net:8080
}
prometheus.home.2rjus.net {
log {
output file /var/log/caddy/prometheus.log {
mode 644
}
}
reverse_proxy http://monitoring01.home.2rjus.net:9090
}
alertmanager.home.2rjus.net {
log {
output file /var/log/caddy/alertmanager.log {
mode 644
}
}
reverse_proxy http://monitoring01.home.2rjus.net:9093
}
grafana.home.2rjus.net {
log {
output file /var/log/caddy/grafana.log {
mode 644
}
}
reverse_proxy http://monitoring01.home.2rjus.net:3000
}
jelly.home.2rjus.net {
log {
output file /var/log/caddy/jelly.log {
mode 644
}
}
reverse_proxy http://jelly01.home.2rjus.net:8096
}
http://http-proxy.home.2rjus.net/metrics {
log {
output file /var/log/caddy/caddy-metrics.log {
mode 644
}
}
metrics
}
'';
};
}