lab-infra/machines/router02/nginx-sni.nix

22 lines
448 B
Nix
Raw Normal View History

2024-12-22 02:46:44 +01:00
{ meta, ... }:
let
# Beware, jool will not translate. Prefer ipv6 proxy target
machines = builtins.mapAttrs (
host: { site, ... }: "v6.${host}.${site}.infra.lab.dgnum.eu:443"
) meta.nodes;
in
{
dgn-web.enable = true;
services.nginx = {
sni-proxy = {
preStreamConfig = ''
resolver 127.0.0.53;
'';
enable = true;
redirects = {
"kfet.lab.dgnum.eu" = machines.labcore01;
};
};
};
}