mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 20:49:52 +03:00
Remove 127.0.0.1 mapping for the system's hostname
Also remove the <hostname>.<domain> mapping.
This commit is contained in:
parent
74295866f5
commit
570e523a88
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user