mirror of
https://github.com/elitak/nixos-infect
synced 2024-11-26 05:00:21 +00:00
nameserver parsing fix
This commit is contained in:
parent
10e8dfe80a
commit
1f4ca1ba1a
1 changed files with 2 additions and 7 deletions
|
@ -84,10 +84,7 @@ EOF
|
|||
extraRules1=""
|
||||
fi
|
||||
|
||||
nameservers=()
|
||||
while IFS='' read -r line; do
|
||||
nameservers+=("$line")
|
||||
done < <(grep ^nameserver /etc/resolv.conf | cut -f2 -d' ')
|
||||
readarray nameservers < <(grep ^nameserver /etc/resolv.conf | sed -r 's/^nameserver[[:space:]]+([0-9.a-fA-F]+).*/"\1"/')
|
||||
|
||||
if [[ "$eth0_name" = eth* ]]; then
|
||||
predictable_inames="usePredictableInterfaceNames = lib.mkForce false;"
|
||||
|
@ -99,9 +96,7 @@ EOF
|
|||
# This file was populated at runtime with the networking
|
||||
# details gathered from the active system.
|
||||
networking = {
|
||||
nameservers = [$(for a in "${nameservers[@]}"; do echo -n "
|
||||
$a"; done)
|
||||
];
|
||||
nameservers = [ ${nameservers[@]} ];
|
||||
defaultGateway = "${gateway}";
|
||||
defaultGateway6 = "${gateway6}";
|
||||
dhcpcd.enable = false;
|
||||
|
|
Loading…
Reference in a new issue