snowflake/hosts/kariru/services/traefik.nix

57 lines
1.5 KiB
Nix
Raw Normal View History

2023-06-14 04:44:21 -04:00
_: {
networking.firewall.allowedTCPPorts = [80 443];
services.traefik = {
enable = true;
dynamicConfigOptions = {
http = {
routers = {
api = {
rule = "PathPrefix(`/api/`)";
entryPoints = ["websecure"];
service = "api@internal";
};
sonarr = {
rule = "Host(`sonarr.internal.flake.sh`)";
2023-06-14 04:44:21 -04:00
entryPoints = ["web"];
service = "sonarr";
};
radarr = {
rule = "Host(`radarr.internal.flake.sh`)";
2023-06-14 04:44:21 -04:00
entryPoints = ["web"];
service = "radarr";
};
prowlarr = {
rule = "Host(`prowlarr.internal.flake.sh`)";
2023-06-14 04:44:21 -04:00
entrypoints = ["web"];
service = "prowlarr";
};
};
services = {
sonarr.loadBalancer.servers = [{url = "http://localhost:8989";}];
radarr.loadBalancer.servers = [{url = "http://localhost:7878";}];
prowlarr.loadBalancer.servers = [{url = "http://localhost:9696";}];
};
};
};
staticConfigOptions = {
log.level = "DEBUG";
api.dashboard = false;
api.insecure = false;
global = {
checkNewVersion = false;
sendAnonymousUsage = false;
};
entryPoints = {
websecure = {
address = ":443";
forwardedHeaders.insecure = true;
};
web = {
address = ":80";
forwardedHeaders.insecure = true;
};
};
};
};
}