From 8c88506e05a71755de74040552e5420f89b76e8c Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 29 Feb 2012 21:25:12 +0000 Subject: [PATCH] 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 --- modules/config/networking.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config/networking.nix b/modules/config/networking.nix index 4349b52347a..562d5144531 100644 --- a/modules/config/networking.nix +++ b/modules/config/networking.nix @@ -49,10 +49,10 @@ in { # /etc/hosts: Hostname-to-IP mappings. source = pkgs.writeText "hosts" '' - ${cfg.extraHosts} ${optionalString (cfg.hostName != "") "127.0.0.1 ${hostnameWithDomain} ${cfg.hostName}"} 127.0.0.1 localhost ${localhostWithDomain} + ${cfg.extraHosts} ''; target = "hosts"; }