snowflake/hosts/yuki/services/traefik.nix

44 lines
1.1 KiB
Nix

_: {
networking.firewall.allowedTCPPorts = [80 443];
services.traefik = {
enable = true;
dynamicConfigOptions = {
http = {
routers = {
api = {
rule = "PathPrefix(`/api/`)";
entryPoints = ["websecure"];
service = "api@internal";
};
kanboard = {
rule = "Host(`kanboard.home.arpa`)";
entryPoints = ["web"];
service = "kanboard";
};
stash = {
rule = "Host(`stash.home.arpa`)";
entrypoints = ["web"];
service = "stash";
};
};
services = {
kanboard.loadBalancer.servers = [{url = "http://localhost:8080";}];
stash.loadBalancer.servers = [{url = "http://localhost:9999";}];
};
};
};
staticConfigOptions = {
log.level = "DEBUG";
api.dashboard = false;
api.insecure = false;
global = {
checkNewVersion = false;
sendAnonymousUsage = false;
};
entryPoints = {
websecure.address = ":443";
web.address = ":80";
};
};
};
}