From 570e523a88eebf9e20343608a153a41dbfa8375f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 7 Oct 2012 00:40:00 -0400 Subject: [PATCH] Remove 127.0.0.1 mapping for the system's hostname Also remove the . mapping. --- modules/config/networking.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/config/networking.nix b/modules/config/networking.nix index 2b4be69cc51..f0aafc6b404 100644 --- a/modules/config/networking.nix +++ b/modules/config/networking.nix @@ -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";