NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.97k stars 13.98k forks source link

resolvconf updating incorrectly #40727

Closed mogorman closed 5 years ago

mogorman commented 6 years ago

Issue description

When I connect to different wifi networks my resolv.conf always adds the nameserver from my home network, regardless if im connected to my home network. Forcing me to delete it so that it will go on to the nameservers i received over dhcp. I am using networkmanager. this is currently happening to me on my home and work laptops. I am running 18.03 and 18.09.

Steps to reproduce


networking.extraHosts = ''
  127.0.0.1 mymachineotherstuff
'';
 networking.networkmanager.enable = true;
networking.hostName = "zaphod"; # Define your hostname.
networking.hostId = "00d77503";
networking.networkmanager.wifi.macAddress="random";
# networking.useHostResolvConf = true;
#
networking.firewall.enable = false;
networking.firewall.checkReversePath = false;

are the only options in my config that are related to networking, I thought it might have been some bug with useHostResolvConf, but I disabled it and the problem persists.

Technical details

# nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.10 MiB download, 0.55 MiB unpacked):
  /nix/store/fcvnn0gkdlg60z49rbp60dchvnrlg4fr-bash-4.4-p19-dev
  /nix/store/fjazq1b9xkgjamx9g9wxsv0mcix1k2gw-bash-4.4-p19-dev
copying path '/nix/store/fcvnn0gkdlg60z49rbp60dchvnrlg4fr-bash-4.4-p19-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/fjazq1b9xkgjamx9g9wxsv0mcix1k2gw-bash-4.4-p19-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 4.17.0-rc4, NixOS, 18.09pre139651.6db7f92cc2a (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.0.2`
 - channels(root): `"nixos-18.09pre139651.6db7f92cc2a"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs`

Please run nix-shell -p nix-info --run "nix-info -m" and paste the results.

mogorman commented 6 years ago

I take it back it seems to be directly related to having docker instances running and

networking.useHostResolvConf = true;

being present in config

mogorman commented 5 years ago

cant recreate anymore