From a688bfaa0a9b19918babdc84283a7cdb52daa96d Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Thu, 10 Dec 2020 14:29:38 -0800 Subject: [PATCH] rewrite loopback namservers to 8.8.8.8 --- nixos-infect | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos-infect b/nixos-infect index f61652d..b97427e 100755 --- a/nixos-infect +++ b/nixos-infect @@ -79,7 +79,10 @@ EOF extraRules1="" fi - readarray nameservers < <(grep ^nameserver /etc/resolv.conf | sed -r 's/^nameserver[[:space:]]+([0-9.a-fA-F]+).*/"\1"/') + readarray nameservers < <(grep ^nameserver /etc/resolv.conf | sed -r \ + -e 's/^nameserver[[:space:]]+([0-9.a-fA-F:]+).*/"\1"/' \ + -e 's/127[0-9.]+/8.8.8.8/' \ + -e 's/::1/8.8.8.8/' ) if [[ "$eth0_name" = eth* ]]; then predictable_inames="usePredictableInterfaceNames = lib.mkForce false;"