From e62a56d41d7912212f7d3f9568a890bf7ce6b827 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Sun, 23 Nov 2025 23:28:21 +0100 Subject: [PATCH 1/3] ifstate: 2.1.0 -> 2.2.0 --- nixos/modules/services/networking/ifstate.nix | 9 +-------- pkgs/by-name/if/ifstate/package.nix | 9 +++------ 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/networking/ifstate.nix b/nixos/modules/services/networking/ifstate.nix index 0528000d26ac..5bd748504f09 100644 --- a/nixos/modules/services/networking/ifstate.nix +++ b/nixos/modules/services/networking/ifstate.nix @@ -123,9 +123,8 @@ in type = lib.types.package; default = cfg.package.override { withConfigValidation = false; - withWireguard = false; }; - defaultText = lib.literalExpression "pkgs.ifstate.override { withConfigValidation = false; withWireguard = false; }"; + defaultText = lib.literalExpression "pkgs.ifstate.override { withConfigValidation = false; }"; description = "The initrd IfState package to use."; }; @@ -195,12 +194,6 @@ in }) (lib.mkIf initrdCfg.enable { assertions = [ - { - assertion = - initrdCfg.package.passthru.features.withWireguard - || !(builtins.elem "wireguard" initrdInterfaceTypes); - message = "IfState initrd package is configured without the `wireguard` feature, but wireguard interfaces are configured. Please see the `boot.initrd.network.ifstate.package` option."; - } { assertion = initrdCfg.allowIfstateToDrasticlyIncreaseInitrdSize; message = "IfState in initrd drastically increases the size of initrd, your boot partition may be too small and/or you may have significantly fewer generations. By setting boot.initrd.network.initrd.allowIfstateToDrasticlyIncreaseInitrdSize to true, you acknowledge this fact and keep it in mind when reporting issues."; diff --git a/pkgs/by-name/if/ifstate/package.nix b/pkgs/by-name/if/ifstate/package.nix index 009461086840..1c489da78689 100644 --- a/pkgs/by-name/if/ifstate/package.nix +++ b/pkgs/by-name/if/ifstate/package.nix @@ -10,17 +10,16 @@ withBpf ? false, withConfigValidation ? true, withShellColor ? false, - withWireguard ? true, }: let - version = "2.1.0"; + version = "2.2.0"; src = fetchFromGitea { domain = "codeberg.org"; owner = "liske"; repo = "ifstate"; tag = version; - hash = "sha256-HgbaLKlWU9YL279/WKLMLC/vxwmnDhBZFdELMRyJl0Y="; + hash = "sha256-Q06lGGGQxJ7ntgXRzfnsJN+A/08AIOsOkz3cg2xZGr4="; }; docs = stdenv.mkDerivation { pname = "ifstate-docs"; @@ -80,8 +79,7 @@ let setproctitle ] ++ lib.optional withConfigValidation jsonschema - ++ lib.optional withShellColor pygments - ++ lib.optional withWireguard wgnlpy; + ++ lib.optional withShellColor pygments; pythonRemoveDeps = lib.optional (!withConfigValidation) "jsonschema"; @@ -100,7 +98,6 @@ let withBpf withConfigValidation withShellColor - withWireguard ; }; # needed for access in schema validaten in module From 49c2e65881dc8ddd1e92fce020652b05210274c7 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Mon, 24 Nov 2025 00:08:42 +0100 Subject: [PATCH 2/3] python3Packages.wgnlpy: drop The package has been unmaintained for four years and is no longer needed for ifstate, which was the only known use case. --- .../python-modules/wgnlpy/default.nix | 52 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 - 3 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 pkgs/development/python-modules/wgnlpy/default.nix diff --git a/pkgs/development/python-modules/wgnlpy/default.nix b/pkgs/development/python-modules/wgnlpy/default.nix deleted file mode 100644 index 2865888d2800..000000000000 --- a/pkgs/development/python-modules/wgnlpy/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - fetchpatch, - setuptools, - cryptography, - pyroute2, -}: - -buildPythonPackage rec { - pname = "wgnlpy"; - version = "0.1.5"; - pyproject = true; - - src = fetchFromGitHub { - owner = "ArgosyLabs"; - repo = "wgnlpy"; - rev = "v${version}"; - hash = "sha256-5XAfBiKx4SqouA57PxmaCb0ea7mT2VeUI1tgnQE/ZwQ="; - }; - - patches = [ - # see https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/83019 - # Required for ifstate - # Upstream Issue/PR: https://github.com/ArgosyLabs/wgnlpy/pull/5 - (fetchpatch { - url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/1f78a31dc3e8d7ffd4ff4b8c32fabc3ad0265ae2/community/py3-wgnlpy/0001-fix-exception-when-WGPEER_A_LAST_HANDSHAKE_TIME-is-N.patch"; - hash = "sha256-MO5MMDXnaCPdakMlxCkiCBCDCiTFdG3V66l+AKb95X4="; - }) - ]; - - build-system = [ setuptools ]; - - dependencies = [ - cryptography - pyroute2 - ]; - - pythonImportsCheck = [ - "wgnlpy" - "wgnlpy.nlas" - ]; - - meta = { - description = "Netlink connector to WireGuard"; - homepage = "https://github.com/ArgosyLabs/wgnlpy"; - license = with lib.licenses; [ mit ]; - platforms = lib.platforms.linux; - maintainers = with lib.maintainers; [ marcel ]; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index ada61035c432..cafa518bf45c 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -485,6 +485,7 @@ mapAliases { Wand = throw "'Wand' has been renamed to/replaced by 'wand'"; # Converted to throw 2025-10-29 WazeRouteCalculator = throw "'WazeRouteCalculator' has been renamed to/replaced by 'wazeroutecalculator'"; # Converted to throw 2025-10-29 websocket_client = throw "'websocket_client' has been renamed to/replaced by 'websocket-client'"; # Converted to throw 2025-10-29 + wgnlpy = throw "'wgnlpy' has been removed, as the upstream repository was unmaintained for several years"; # Converted to throw 2025-11-24 worldengine = throw "worldengine has been removed because it has been marked as broken since at least November 2024."; # Added 2025-10-04 WSME = throw "'WSME' has been renamed to/replaced by 'wsme'"; # Converted to throw 2025-10-29 wxPython_4_2 = throw "'wxPython_4_2' has been renamed to/replaced by 'wxpython'"; # Converted to throw 2025-10-29 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2e47ec76190a..9afa326ef25d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20360,8 +20360,6 @@ self: super: with self; { wget = callPackage ../development/python-modules/wget { }; - wgnlpy = callPackage ../development/python-modules/wgnlpy { }; - wgpu-py = callPackage ../development/python-modules/wgpu-py { }; whatthepatch = callPackage ../development/python-modules/whatthepatch { }; From eade8e0bcd55db5568e3e547f57168ad1526fd93 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Mon, 24 Nov 2025 16:57:07 +0100 Subject: [PATCH 3/3] 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}";