mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 10:16:44 +01:00
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:
parent
e872efaa8d
commit
8c88506e05
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue