nebula: Actually enable relay support

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

View file

@ -9,6 +9,11 @@ let
netCfg = config.custom.networking; netCfg = config.custom.networking;
publicPort = 47141; publicPort = 47141;
lighthouses =
netCfg.peers
|> lib.filter (peer: peer.overlay.isLighthouse)
|> lib.map (lighthouse: lighthouse.overlay.address);
in in
{ {
options.custom.services.nebula = { options.custom.services.nebula = {
@ -74,11 +79,10 @@ in
listen.port = lib.mkIf netCfg.underlay.isPublic publicPort; listen.port = lib.mkIf netCfg.underlay.isPublic publicPort;
inherit (netCfg.overlay) isLighthouse; inherit (netCfg.overlay) isLighthouse;
lighthouses = lib.mkIf (!netCfg.overlay.isLighthouse) ( lighthouses = lib.mkIf (!netCfg.overlay.isLighthouse) lighthouses;
netCfg.peers
|> lib.filter (peer: peer.overlay.isLighthouse) isRelay = netCfg.overlay.isLighthouse;
|> lib.map (lighthouse: lighthouse.overlay.address) relays = lib.mkIf (!netCfg.overlay.isLighthouse) lighthouses;
);
staticHostMap = staticHostMap =
netCfg.peers netCfg.peers