i2pd: port from services.i2pd.proto to services.i2pd.settings
Some checks failed
nix-bitcoin tests / build_test_drivers (push) Has been cancelled
nix-bitcoin tests / check_flake (push) Has been cancelled
nix-bitcoin tests / test_scenario (default) (push) Has been cancelled
nix-bitcoin tests / test_scenario (joinmarket-bitcoind-29) (push) Has been cancelled
nix-bitcoin tests / test_scenario (netns) (push) Has been cancelled
nix-bitcoin tests / test_scenario (netnsRegtest) (push) Has been cancelled
Some checks failed
nix-bitcoin tests / build_test_drivers (push) Has been cancelled
nix-bitcoin tests / check_flake (push) Has been cancelled
nix-bitcoin tests / test_scenario (default) (push) Has been cancelled
nix-bitcoin tests / test_scenario (joinmarket-bitcoind-29) (push) Has been cancelled
nix-bitcoin tests / test_scenario (netns) (push) Has been cancelled
nix-bitcoin tests / test_scenario (netnsRegtest) (push) Has been cancelled
nixpkgs 26.11 rewrote the i2pd module: the typed `proto.<endpoint>` 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VyL5fiZuMB42fd9MUAJW7c
This commit is contained in:
parent
88007a9771
commit
ba6d522f51
2 changed files with 17 additions and 4 deletions
|
|
@ -289,7 +289,7 @@ let
|
||||||
nbLib = config.nix-bitcoin.lib;
|
nbLib = config.nix-bitcoin.lib;
|
||||||
secretsDir = config.nix-bitcoin.secretsDir;
|
secretsDir = config.nix-bitcoin.secretsDir;
|
||||||
|
|
||||||
i2pSAM = config.services.i2pd.proto.sam;
|
i2pSAM = config.services.i2pd.settings.sam;
|
||||||
|
|
||||||
configFile = builtins.toFile "bitcoin.conf" ''
|
configFile = builtins.toFile "bitcoin.conf" ''
|
||||||
# We're already logging via journald
|
# We're already logging via journald
|
||||||
|
|
@ -379,7 +379,13 @@ in {
|
||||||
|
|
||||||
services.i2pd = mkIf (cfg.i2p != false) {
|
services.i2pd = mkIf (cfg.i2p != false) {
|
||||||
enable = true;
|
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 = [
|
systemd.tmpfiles.rules = [
|
||||||
|
|
|
||||||
|
|
@ -111,10 +111,17 @@ in {
|
||||||
port = 9050;
|
port = 9050;
|
||||||
IsolateDestAddr = true;
|
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 = [
|
networking.firewall.interfaces.nb-br.allowedTCPPorts = [
|
||||||
config.services.tor.client.socksListenAddress.port
|
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;
|
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue