nix/hosts/nixos/vps/proxy.nix
2025-12-13 11:14:13 +01:00

38 lines
689 B
Nix

{ config, ... }:
{
# Traefik dynamic configuration for vps host
services.traefik.dynamicConfigOptions = {
http = {
routers = {
# Photo service (Immich)
photo = {
rule = "Host(`photo.yanlincs.com`)";
service = "photo";
tls = {
certResolver = "cloudflare";
domains = [{
main = "*.yanlincs.com";
}];
};
};
};
services = {
# Photo service backend
photo = {
loadBalancer = {
servers = [{
url = "http://thinkpad.yanlincs.com:5000";
}];
};
};
};
};
};
}