From beeb739e480b9a375201e380006f697e23e60892 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 23 Jul 2026 22:25:21 +0200 Subject: [PATCH] nixos/test-driver: fix corrupt hosts files primaryIPAddress is defined using lib.optionalString. If it is the empty string (because there are no assigned IP addresses), and the machine has a hostname, we don't want to generate an invalid hosts file with that empty string as the first (IP address) field. --- nixos/lib/testing/network.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix index 86d65faf21ad..635e5ebebf05 100644 --- a/nixos/lib/testing/network.nix +++ b/nixos/lib/testing/network.nix @@ -93,7 +93,7 @@ let # We also want to test router protocols that enable connections # between nodes even if they don't share a VLAN, so we include # the primary IPs of all machines in the hosts file. - primaryIPs = [ + primaryIPs = lib.remove "" [ remoteConfig.networking.primaryIPAddress remoteConfig.networking.primaryIPv6Address ];