nix/hosts/nixos/hs/proxy.nix
2025-09-30 08:04:39 +02:00

33 lines
683 B
Nix

{ config, ... }:
{
# Traefik dynamic configuration for hs host
services.traefik.dynamicConfigOptions = {
http = {
routers = {
syncthing = {
rule = "Host(`syncthing.${config.networking.hostName}.yanlincs.com`)";
service = "syncthing";
tls = {
certResolver = "cloudflare";
domains = [{
main = "*.${config.networking.hostName}.yanlincs.com";
}];
};
};
};
services = {
syncthing = {
loadBalancer = {
servers = [{
url = "http://localhost:8384";
}];
};
};
};
};
};
}