From 5832da09419629b5190732303b34d478f48faa5f Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 20 Feb 2024 17:57:24 +0100 Subject: [PATCH] feat(dgn-network): Use only the specified DNS --- modules/dgn-network.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/dgn-network.nix b/modules/dgn-network.nix index 888c8be..0c7eff7 100644 --- a/modules/dgn-network.nix +++ b/modules/dgn-network.nix @@ -32,16 +32,17 @@ let routes = builtins.map mkRoute net.gateways; # Add default DNS servers - dns = [ - "1.1.1.1#cloudflare-dns.com" - "8.8.8.8#dns.google" - "1.0.0.1#cloudflare-dns.com" - "8.8.4.4#dns.google" - "2606:4700:4700::1111#cloudflare-dns.com" - "2001:4860:4860::8888#dns.google" - "2606:4700:4700::1001#cloudflare-dns.com" - "2001:4860:4860::8844#dns.google" - ] ++ (net'.dns or [ ]); + dns = + net'.dns or [ + "1.1.1.1#cloudflare-dns.com" + "8.8.8.8#dns.google" + "1.0.0.1#cloudflare-dns.com" + "8.8.4.4#dns.google" + "2606:4700:4700::1111#cloudflare-dns.com" + "2001:4860:4860::8888#dns.google" + "2606:4700:4700::1001#cloudflare-dns.com" + "2001:4860:4860::8844#dns.google" + ]; networkConfig = optionalAttrs (net ? DHCP) { inherit (net) DHCP; }; };