From b0db2aaef17f69d61bef72c9fee981cc164d2538 Mon Sep 17 00:00:00 2001 From: magic_rb Date: Fri, 15 Nov 2024 14:25:07 +0100 Subject: [PATCH] `omen`: re-enable `systemd-resolved` Signed-off-by: magic_rb --- nixos/systems/omen/networking.nix | 37 ++++++++++++++----------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/nixos/systems/omen/networking.nix b/nixos/systems/omen/networking.nix index 4c59d92..afc76d7 100644 --- a/nixos/systems/omen/networking.nix +++ b/nixos/systems/omen/networking.nix @@ -17,8 +17,6 @@ in { hostId = "10c7ffc5"; - nameservers = [(secret.network.ips.blowhole.ip or "")]; - firewall.enable = false; wireguard.interfaces."wg0" = @@ -73,35 +71,34 @@ in { linkConfig.Name = "eth1"; }; - systemd.network.networks."50-eth0" = { - matchConfig.Name = "eth0"; + systemd.network.networks."50-eth" = { + matchConfig.Name = "eth?"; networkConfig.DHCP = "ipv4"; linkConfig.RequiredForOnline = "no"; + extraConfig = '' + [DHCP] + UseDNS=false + ''; }; - systemd.network.networks."50-eth1" = { - matchConfig.Name = "eth1"; + systemd.network.networks."50-wlan" = { + matchConfig.Name = "wlan?"; networkConfig.DHCP = "ipv4"; - linkConfig.RequiredForOnline = "no"; + extraConfig = '' + [DHCP] + UseDNS=false + ''; }; systemd.network.wait-online.enable = false; - services.resolved.enable = false; - environment.etc."resolv.conf".text = '' - nameserver ${secret.network.ips.blowhole.ip or ""} - ''; - - services.resolved.extraConfig = '' - [Resolve] - DNS=${secret.network.ips.blowhole.ip or ""} - FallbackDNS= - ''; + services.resolved.enable = true; + services.resolved.fallbackDns = lib.mkForce []; + networking.nameservers = lib.mkForce [ + (secret.network.ips.blowhole.ip or "") + ]; networking.wireless.iwd.enable = true; - networking.wireless.iwd.settings = { - General.EnableNetworkConfiguration = true; - }; hardware.bluetooth = { enable = true; settings = {