homelab/nixos/hosts/dns/networking.nix
plasmagoat 0f49c6c37c
Some checks failed
Test / tests (push) Failing after 16m54s
/ OpenTofu (push) Successful in 17s
dump
2025-11-18 20:00:39 +01:00

21 lines
542 B
Nix

{
networking.hostName = "dns";
# networking.useHostResolvConf = false;
# networking.interfaces.eth0.useDHCP = true;
networking.interfaces.eth0.ipv4.addresses = [
{
address = "192.168.1.53";
prefixLength = 24;
}
];
networking.defaultGateway = "192.168.1.1"; # your router
networking.nameservers = ["8.8.8.8"]; # fallback resolvers
networking.firewall.allowedTCPPorts = [53 67 80 443];
networking.firewall.allowedUDPPorts = [53 67];
networking.hosts = {
"192.168.1.53" = ["dns" "dns.lab"];
};
}