From ba6d522f51542515c16fb5f9c7047c75b09e352a Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 27 Aug 2026 16:57:20 +0200 Subject: [PATCH] i2pd: port from services.i2pd.proto to services.i2pd.settings nixpkgs 26.11 rewrote the i2pd module: the typed `proto.` options are gone, replaced by the freeform `settings.*` attrset that maps directly onto i2pd.conf. Only inTunnels/outTunnels got mkRenamedOption shims, so `proto.sam` is a hard eval failure on 26.11. This is not a pure rename. The old `proto.sam` was an endpoint option with defaults (127.0.0.1:7656) and an `enable` flag; `settings` is freeform and carries no defaults, and the enable key is spelled `enabled`. Both consumers read `.address`/`.port` back, so the old defaults have to be restated at each site. Upstream nix-bitcoin was archived 2026-08-13 at v0.0.139 targeting NixOS 26.05, so no upstream port is coming for this. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01VyL5fiZuMB42fd9MUAJW7c --- modules/bitcoind.nix | 10 ++++++++-- modules/netns-isolation.nix | 11 +++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index 36ef911..26d46c7 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -289,7 +289,7 @@ let nbLib = config.nix-bitcoin.lib; secretsDir = config.nix-bitcoin.secretsDir; - i2pSAM = config.services.i2pd.proto.sam; + i2pSAM = config.services.i2pd.settings.sam; configFile = builtins.toFile "bitcoin.conf" '' # We're already logging via journald @@ -379,7 +379,13 @@ in { services.i2pd = mkIf (cfg.i2p != false) { enable = true; - proto.sam.enable = true; + # `settings` is freeform and has no defaults; restate the endpoint the + # old `proto.sam` option provided (127.0.0.1:7656). See netns-isolation. + settings.sam = { + enabled = true; + address = mkDefault "127.0.0.1"; + port = mkDefault 7656; + }; }; systemd.tmpfiles.rules = [ diff --git a/modules/netns-isolation.nix b/modules/netns-isolation.nix index 9357503..307fef2 100644 --- a/modules/netns-isolation.nix +++ b/modules/netns-isolation.nix @@ -111,10 +111,17 @@ in { port = 9050; IsolateDestAddr = true; }; - services.i2pd.proto.sam.address = bridgeIp; + # nixpkgs 26.11 replaced `services.i2pd.proto.*` with the freeform + # `services.i2pd.settings.*`, which carries no defaults. The old + # `proto.sam` endpoint defaulted to 127.0.0.1:7656, and we read the port + # back below, so the default has to be restated here. + services.i2pd.settings.sam = { + address = bridgeIp; + port = mkDefault 7656; + }; networking.firewall.interfaces.nb-br.allowedTCPPorts = [ config.services.tor.client.socksListenAddress.port - config.services.i2pd.proto.sam.port + config.services.i2pd.settings.sam.port ]; boot.kernel.sysctl."net.ipv4.ip_forward" = true;