From eade8e0bcd55db5568e3e547f57168ad1526fd93 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Mon, 24 Nov 2025 16:57:07 +0100 Subject: [PATCH] nixos/ifstate: remove netns so ifstate can identify interface This test has never worked because when 'identify' is not configured, ifstate searches for an interface with the specified name inside the defined network namespace. However, virtualisation.interfaces cannot place an interface into a specific network namespace, and without identifying details (such as a MAC address or bus ID), ifstate is unable to locate the correct interface. Removing the network namespace avoids this problem. --- nixos/tests/ifstate/initrd-wireguard.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/nixos/tests/ifstate/initrd-wireguard.nix b/nixos/tests/ifstate/initrd-wireguard.nix index 7fe99a5a2646..6eb90c49a829 100644 --- a/nixos/tests/ifstate/initrd-wireguard.nix +++ b/nixos/tests/ifstate/initrd-wireguard.nix @@ -10,20 +10,19 @@ let { enable = true; settings = { - namespaces.outside.interfaces.eth1 = { - addresses = [ "2001:0db8:a::${builtins.toString id}/64" ]; - link = { - state = "up"; - kind = "physical"; - }; - }; interfaces = { + eth1 = { + addresses = [ "2001:0db8:a::${builtins.toString id}/64" ]; + link = { + state = "up"; + kind = "physical"; + }; + }; wg0 = { addresses = [ "2001:0db8:b::${builtins.toString id}/64" ]; link = { state = "up"; kind = "wireguard"; - bind_netns = "outside"; }; wireguard = { private_key = "!include ${pkgs.writeText "wg_priv.key" wgPriv}";