nixos-servers/nix/modules/networking/dmz_services/dnsmasq.nix

52 lines
1.2 KiB
Nix
Raw Normal View History

2024-01-31 20:58:23 +00:00
{ config, ... }:
let
cfg = config.lab.networking;
in
{
no-resolv = true;
local = "/dmz/";
dhcp-fqdn = true;
no-hosts = true;
expand-hosts = true;
domain = "dmz";
dhcp-authoritative = true;
ra-param = "*,0,0";
alias = "${cfg.public.ipv4.router},${cfg.dmz.ipv4.dockerSwarm}";
log-dhcp = true;
log-queries = true;
port = "5353";
host-record = [
"hermes.dmz,${cfg.dmz.ipv4.services},${cfg.dmz.ipv6.services}"
"ipv4.hermes.dmz,${cfg.dmz.ipv4.services}" # TODO: Do we need these?
2024-01-31 20:58:23 +00:00
"ipv6.hermes.dmz,${cfg.dmz.ipv6.services}"
];
server = [
cfg.dmz.ipv4.router
"/kun.is/${cfg.dmz.ipv4.services}"
];
dhcp-range = [
"192.168.30.50,192.168.30.127,15m"
"2a0d:6e00:1a77:30::,ra-stateless,ra-names"
];
dhcp-host = [
"b8:27:eb:b9:ab:e2,esrom"
"ba:db:ee:f0:00:01,maestro,${cfg.dmz.ipv4.dockerSwarm}"
2024-01-31 20:58:23 +00:00
];
dhcp-option = [
"3,${cfg.dmz.ipv4.router}"
"option:dns-server,${cfg.dmz.ipv4.router}"
"option6:dns-server,[2a02:58:19a:30::1]"
];
address = [
"/ns.pizzapim.nl/${cfg.dmz.ipv4.services}"
"/ns.pizzapim.nl/${cfg.dmz.ipv6.services}"
2024-03-28 19:01:17 +00:00
"/kms.kun.is/192.168.30.129"
2024-03-29 14:49:34 +00:00
"/ssh.git.kun.is/192.168.30.132"
2024-01-31 20:58:23 +00:00
];
}