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.
|
{ # /etc/hosts: Hostname-to-IP mappings.
|
||||||
source = pkgs.writeText "hosts"
|
source = pkgs.writeText "hosts"
|
||||||
''
|
''
|
||||||
${cfg.extraHosts}
|
|
||||||
${optionalString (cfg.hostName != "")
|
${optionalString (cfg.hostName != "")
|
||||||
"127.0.0.1 ${hostnameWithDomain} ${cfg.hostName}"}
|
"127.0.0.1 ${hostnameWithDomain} ${cfg.hostName}"}
|
||||||
127.0.0.1 localhost ${localhostWithDomain}
|
127.0.0.1 localhost ${localhostWithDomain}
|
||||||
|
${cfg.extraHosts}
|
||||||
'';
|
'';
|
||||||
target = "hosts";
|
target = "hosts";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user