nameservers: Specify ports

This commit is contained in:
SebastianStork 2026-03-02 16:54:07 +01:00
parent 7fcbc3dcad
commit 2aba83de58
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
3 changed files with 23 additions and 10 deletions

View file

@ -58,18 +58,24 @@ let
};
in
{
options.custom.services.private-nameserver.enable = lib.mkEnableOption "";
options.custom.services.private-nameserver = {
enable = lib.mkEnableOption "";
port = lib.mkOption {
type = lib.types.port;
default = 5335;
};
};
config = lib.mkIf cfg.enable {
services = {
nsd = {
enable = true;
interfaces = [ netCfg.overlay.interface ];
interfaces = [ "${netCfg.overlay.address}@${toString cfg.port}" ];
zones.${netCfg.overlay.domain}.data = zoneData;
};
nebula.networks.mesh.firewall.inbound = lib.singleton {
port = 53;
inherit (cfg) port;
proto = "any";
host = "any";
};