From 38345f6dbe6faecc69500d5d96ee5ad946b61140 Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 14 Jul 2024 00:49:52 +0200 Subject: [PATCH] hosts/carbon: Move DNS specific network config to DNS file --- hosts/carbon/configuration.nix | 10 ---------- hosts/carbon/dns.nix | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hosts/carbon/configuration.nix b/hosts/carbon/configuration.nix index 973c800..3c9b480 100644 --- a/hosts/carbon/configuration.nix +++ b/hosts/carbon/configuration.nix @@ -25,13 +25,6 @@ "; networking.useDHCP = false; - # Local Router IPs - networking.interfaces.lo.ipv6.addresses = [ - { address = "fd00:152:152::1"; prefixLength = 128; } # Anycast - ]; - networking.interfaces.lo.ipv4.addresses = [ - { address = "10.152.0.1"; prefixLength = 32; } # Anycast - ]; # Network ## LTE-Uplink networking.vlans."enp1s0.102" = { @@ -39,9 +32,6 @@ interface = "enp1s0"; }; - # Use Anycast Nameservers - networking.nameservers = [ "fd00:152:152::1" "10.152.0.1" ]; - networking.nat = { enableIPv6 = true; enable = true; diff --git a/hosts/carbon/dns.nix b/hosts/carbon/dns.nix index 2019726..9d935cc 100644 --- a/hosts/carbon/dns.nix +++ b/hosts/carbon/dns.nix @@ -2,6 +2,14 @@ { + # Loopbacks for DNS resolver IPs + networking.interfaces.lo.ipv6.addresses = [ + { address = "fd00:152:152::1"; prefixLength = 128; } # Anycast + ]; + networking.interfaces.lo.ipv4.addresses = [ + { address = "10.152.0.1"; prefixLength = 32; } # Anycast + ]; + networking.firewall.allowedUDPPorts = [ 53 ]; networking.firewall.allowedTCPPorts = [ 53 ]; @@ -20,4 +28,7 @@ }; }; + # Use Anycast Nameservers + networking.nameservers = [ "fd00:152:152::1" "10.152.0.1" ]; + }