Remove 127.0.0.1 mapping for the system's hostname

Also remove the <hostname>.<domain> mapping.
This commit is contained in:
Eelco Dolstra 2012-10-07 00:40:00 -04:00
parent 74295866f5
commit 570e523a88

View File

@ -18,13 +18,6 @@ let
};
localhostWithDomain = optionalString (cfg.domain != "")
"localhost.${cfg.domain}";
hostnameWithDomain = optionalString
(cfg.domain != "" && cfg.hostName != "")
"${cfg.hostName}.${cfg.domain}";
in
{
@ -49,9 +42,7 @@ in
{ # /etc/hosts: Hostname-to-IP mappings.
source = pkgs.writeText "hosts"
''
${optionalString (cfg.hostName != "")
"127.0.0.1 ${hostnameWithDomain} ${cfg.hostName}"}
127.0.0.1 localhost ${localhostWithDomain}
127.0.0.1 localhost
${cfg.extraHosts}
'';
target = "hosts";