Separete container and proxy config

This commit is contained in:
Yan Lin 2025-09-08 20:37:50 +02:00
parent 84d2323250
commit 782b3ef4bf
9 changed files with 579 additions and 543 deletions

30
hosts/nixos/hs/proxy.nix Normal file
View file

@ -0,0 +1,30 @@
{ 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";
}];
};
};
};
};
};
}