NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.14k stars 14.17k forks source link

/etc/hosts missing localhost 15.09.1012.9fe0c23 (Dingo) #12928

Closed witkamp closed 7 years ago

witkamp commented 8 years ago

By default the /etc/hosts file empty

Setting network.extraHosts = "" produces a /etc/hosts file with localhost defined as expected.

I would expect the /etc/hosts/ file would contain localhost definitions by default.

This is my configuration.nix file

{ config, pkgs, ... }: {
  imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
  fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
  swapDevices = [ ];
  nix.maxJobs = 24;
  # Use the gummiboot efi boot loader.
  boot.loader.gummiboot.enable = true;
  networking = {
#    extraHosts = "";        # Needed to generate /etc/hosts
  };
}
grahamc commented 8 years ago

On 15.09.1012.9fe0c23 (Dingo) I don't see this behavior. Can you try upgrading and try again?

witkamp commented 8 years ago

Updated to 15.09.1012.9fe0c23. Problem persists.

ibrahimsag commented 7 years ago

@witkamp any updates?

witkamp commented 7 years ago

No updates, I have moved on to 16.09 and have not experienced this problem since.

ibrahimsag commented 7 years ago

can we close this then?

Mic92 commented 7 years ago

nss_myhostname was not correctly module before: this is fixed in unstable: https://github.com/NixOS/nixpkgs/commit/987aac77945e2bee070723c9758f8173e9e7e974