nebula: Set listen address on hosts with fixed addresses

This commit is contained in:
SebastianStork 2026-02-08 19:26:58 +01:00
parent eee2cebd21
commit f93908d157
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -76,7 +76,10 @@ in
key = config.sops.secrets."nebula/host-key".path;
tun.device = netCfg.overlay.interface;
listen.port = lib.mkIf netCfg.underlay.isPublic publicPort;
listen = {
host = lib.mkIf (netCfg.underlay.address != null) netCfg.underlay.address;
port = lib.mkIf netCfg.underlay.isPublic publicPort;
};
inherit (netCfg.overlay) isLighthouse;
lighthouses = lib.mkIf (!netCfg.overlay.isLighthouse) lighthouses;