From 172c42963e753371642b16e8886ae98a8092115e Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sun, 8 Dec 2024 14:57:43 +0530 Subject: [PATCH] DNS shenanigans --- hosts/skipper/network/default.nix | 21 +++------------------ hosts/skipper/network/wireguard.nix | 7 ++----- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/hosts/skipper/network/default.nix b/hosts/skipper/network/default.nix index 24426c6..7995fef 100644 --- a/hosts/skipper/network/default.nix +++ b/hosts/skipper/network/default.nix @@ -1,12 +1,6 @@ { lib, ... }: { imports = [ ./wireguard.nix ]; - services.resolved = { - enable = true; - domains = [ "~." ]; - fallbackDns = [ ]; - }; - systemd = { network = { enable = true; @@ -58,6 +52,7 @@ }; networkConfig = { DHCP = "yes"; + Domains = [ "~." ]; }; dhcpV4Config = { UseDomains = true; @@ -75,6 +70,7 @@ networkConfig = { DHCP = "yes"; IgnoreCarrierLoss = "3s"; + Domains = [ "~." ]; }; dhcpV4Config = { UseDomains = true; @@ -91,20 +87,9 @@ }; }; + services.resolved.enable = true; networking = { - nameservers = [ - "10.10.10.1" - ]; useDHCP = lib.mkDefault false; - extraHosts = '' - 10.10.10.1 Bifrost - 10.10.10.2 Skipper - 10.10.10.10 Rico0 - 10.10.10.11 Rico1 - 10.10.10.12 Rico2 - 10.10.10.13 Wynne - 10.10.10.14 Layne - ''; firewall = { allowedTCPPorts = [ diff --git a/hosts/skipper/network/wireguard.nix b/hosts/skipper/network/wireguard.nix index 123358a..cce2f81 100644 --- a/hosts/skipper/network/wireguard.nix +++ b/hosts/skipper/network/wireguard.nix @@ -7,11 +7,7 @@ let wireguard-peers = import ../../shared/wireguard-peers.nix { }; in { group = config.users.users.systemd-network.group; }; }; - networking = { - firewall = { - trustedInterfaces = [ "Homelab" ]; - }; - }; + networking.firewall.trustedInterfaces = [ "Homelab" ]; systemd.network = { enable = true; netdevs."99-Homelab" = { @@ -33,6 +29,7 @@ let wireguard-peers = import ../../shared/wireguard-peers.nix { }; in { }; networkConfig = { DNS = "10.10.10.1"; + Domains = [ "labs.adtya.xyz" ]; Address = [ "${config.nodeconfig.facts.wireguard-ip}/24" ];