mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 18:59:07 +01:00
nameservers: Specify ports
This commit is contained in:
parent
7fcbc3dcad
commit
2aba83de58
3 changed files with 23 additions and 10 deletions
|
|
@ -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";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue