overlay, nebula: Add functionality to accommodate port forwarding

This commit is contained in:
SebastianStork 2026-03-04 19:14:34 +01:00
parent d9a85536a2
commit 96c4dbe626
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
2 changed files with 28 additions and 9 deletions

View file

@ -51,6 +51,22 @@ in
};
isLighthouse = lib.mkEnableOption "";
advertise = {
address = lib.mkOption {
type = lib.types.nullOr lib.types.nonEmptyStr;
default =
if config.custom.networking.underlay.isPublic then
config.custom.networking.underlay.address
else
null;
};
port = lib.mkOption {
type = lib.types.nullOr lib.types.port;
default = if cfg.advertise.address != null then config.custom.services.nebula.listenPort else null;
};
};
role = lib.mkOption {
type = lib.types.enum [
"client"