summaryrefslogtreecommitdiffstats
path: root/nixos/lib/build-vms.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-26 18:52:34 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-26 18:52:34 +0100
commite8baaba044689b75ef4f36ebc5a93b7462c23cb2 (patch)
tree724d7b51c4eea2ae29995d677fe36103422e7aaa /nixos/lib/build-vms.nix
parent953f12995be933fb2c1efe314299556e4178e26e (diff)
Add a regression test for hostname / nss_myhostname
Issue #1248.
Diffstat (limited to 'nixos/lib/build-vms.nix')
-rw-r--r--nixos/lib/build-vms.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix
index d20fbc1cc663..498c0a377836 100644
--- a/nixos/lib/build-vms.nix
+++ b/nixos/lib/build-vms.nix
@@ -68,8 +68,8 @@ rec {
# the first interface (i.e. the first network in its
# virtualisation.vlans option).
networking.extraHosts = flip concatMapStrings machines
- (m: let config = (getAttr m nodes).config; in
- optionalString (config.networking.primaryIPAddress != "")
+ (m': let config = (getAttr m' nodes).config; in
+ optionalString (m.first != m' && config.networking.primaryIPAddress != "")
("${config.networking.primaryIPAddress} " +
"${config.networking.hostName}\n"));