modules/config/networking.nix: list extraHosts *after* the local hostname

This change allows using extraHosts to specify additional aliases for 127.0.0.1
without overriding the local hostname in the process.

svn path=/nixos/trunk/; revision=32711
This commit is contained in:
Peter Simons 2012-02-29 21:25:12 +00:00
parent e872efaa8d
commit 8c88506e05

View file

@ -49,10 +49,10 @@ in
{ # /etc/hosts: Hostname-to-IP mappings.
source = pkgs.writeText "hosts"
''
${cfg.extraHosts}
${optionalString (cfg.hostName != "")
"127.0.0.1 ${hostnameWithDomain} ${cfg.hostName}"}
127.0.0.1 localhost ${localhostWithDomain}
${cfg.extraHosts}
'';
target = "hosts";
}