From fa9f557b964f091001c173ce4e9c1f285b47ca2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 8 Jul 2009 16:10:09 +0000 Subject: [PATCH] Add `localhost' under its "real" host name to /etc/hosts. svn path=/nixos/branches/modular-nixos/; revision=16258 --- modules/config/networking.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/config/networking.nix b/modules/config/networking.nix index ff4d0f3fee4..65f22445b06 100644 --- a/modules/config/networking.nix +++ b/modules/config/networking.nix @@ -41,6 +41,9 @@ in source = pkgs.writeText "hosts" '' ${config.networking.extraHosts} + ${if config.networking.hostName != "" + then "127.0.0.1 ${config.networking.hostName}" + else ""} 127.0.0.1 localhost ''; target = "hosts";