mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 05:37:40 +03:00
Fix bug in NetworkManager name server configuration
This commit is contained in:
parent
d94aa36f1e
commit
bfd86d4e74
@ -47,7 +47,12 @@ let
|
||||
overrideNameserversScript = writeScript "02overridedns" ''
|
||||
#!/bin/sh
|
||||
${optionalString cfg.overrideNameservers "${gnused}/bin/sed -i '/nameserver /d' /etc/resolv.conf"}
|
||||
${concatStringsSep ";" (map (s: "echo 'nameserver ${s}' >> /etc/resolv.conf") config.networking.nameservers)}
|
||||
${concatStrings (map (s: ''
|
||||
${optionalString cfg.appendNameservers
|
||||
"${gnused}/bin/sed -i '/nameserver ${s}/d' /etc/resolv.conf"
|
||||
}
|
||||
echo 'nameserver ${s}' >> /etc/resolv.conf
|
||||
'') config.networking.nameservers)}
|
||||
'';
|
||||
|
||||
in {
|
||||
|
Loading…
Reference in New Issue
Block a user