From 9e6bede5abd882943e58d665ba6245c5b32d91e8 Mon Sep 17 00:00:00 2001
From: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Date: Tue, 20 Oct 2020 00:36:32 +0200
Subject: [PATCH] nixos/initrd-network: fix /etc/resolv.conf when multiple dns
 servers from DHCP

Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
---
 nixos/modules/system/boot/initrd-network.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nixos/modules/system/boot/initrd-network.nix b/nixos/modules/system/boot/initrd-network.nix
index ec794d6eb014..2a7417ed3715 100644
--- a/nixos/modules/system/boot/initrd-network.nix
+++ b/nixos/modules/system/boot/initrd-network.nix
@@ -32,8 +32,8 @@ let
         fi
         if [ -n "$dns" ]; then
           rm -f /etc/resolv.conf
-          for i in $dns; do
-            echo "nameserver $dns" >> /etc/resolv.conf
+          for server in $dns; do
+            echo "nameserver $server" >> /etc/resolv.conf
           done
         fi
       fi