Skip to content

use the pinned nixpkgs packages - #245

Merged
prusnak merged 7 commits into
masterfrom
packages-upstream
Nov 10, 2026
Merged

prusnak merged 7 commits into
masterfrom
packages-upstream

Conversation

@prusnak

@prusnak prusnak commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: modules modules/ and pkgs/lib.nix area: packages pkgs/ and flake pins type: removal Module, package or option dropped (implies breaking) labels Nov 9, 2026
@prusnak prusnak mentioned this pull request Nov 9, 2026
15 of 33 tasks
@seberm seberm added this to the v0.1.6 milestone Nov 9, 2026
@seberm

seberm commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

@prusnak we should target v0.1.6


Request changes: the migration notices target a config version that is already released.

Must fix

  • v0.1.5 is already tagged, so users on configVersion = "0.1.5" never see these notices ({ version = "0.1.5"; enable = true; } passes in the new test). Move both changes entries to 0.1.6. This also needs:
    • a new ## Upgrading to config version 0.1.6 section in docs/upgrading.md (above 0.1.5, ending with the configVersion line). Revert the edit to the 0.1.5 intro, since that section belongs to a released version.
    • nix-bitcoin.configVersion = "0.1.6"; in examples/configuration.nix.
    • tests: trustedcoin can't stay in the shared [ "currencyrate" "rebalance" "clnrest" ] list, whose cases are fixed at 0.1.4/0.1.5. Give it its own cases like testRtlPackageMigration, and shift both to 0.1.5 → false, 0.1.6 → true.
    • both commit messages say "0.1.5 migration notice".

Question

  • Are the notices needed? nix-bitcoin.pkgs.rtl/.trustedcoin still work, and a stale packages.<system>.rtl reference already fails at eval with a missing-attribute error. A release-notes entry may be enough, and it doesn't block every RTL/TrustedCoin user's deploy until they bump configVersion. Maintainers' call.

Tested: x86_64 builds of both nixpkgs packages (binary paths match the modules; RTL's RTL_CONFIG_PATH/DB_DIRECTORY_PATH are set by the module, so the wrapper's . default doesn't apply), module-config on the head and merged with master, the trustedcoin VM scenario (not in CI), and pinned.nix regenerates identically.

Assisted-by: Claude Code (Claude Opus 5.5)

@prusnak
prusnak force-pushed the packages-upstream branch 2 times, most recently from 1faa16c to 4acaf4f Compare November 9, 2026 23:04
@prusnak prusnak changed the title {rtl,trustedcoin}: use the pinned nixpkgs package use the pinned nixpkgs packages Nov 9, 2026
@prusnak
prusnak requested a review from seberm November 9, 2026 23:17
@prusnak

prusnak commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@seberm addressed your concerns - please review

seberm
seberm previously approved these changes Nov 10, 2026

@seberm seberm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping the changes entries instead of moving them is the right call: the old flake attributes fail at eval with a clear missing-attribute error, and nix-bitcoin.pkgs.* keep working.

Should

  • docs/upgrading.md: the ## Upgrading to config version 0.1.6 section has no matching changes entry, so nothing points users at it, and it doesn't end with the configVersion line like the other sections. Either add that line or move the notes to the 0.1.6 release notes. I lean towards release notes; all four items are flake-attribute changes.

Notes, no action

  • pyln-* now follow nixpkgs-unstable instead of the daemon's source (26.06.9 vs clightning 26.06.10). Same locked input and the default scenario covers the Python plugins, so skew shows up in CI.
  • One trustedcoin VM run hung in restart-bitcoind: the plugin started before bitcoind RPC was up, logged tip: 0, lightningd aborted with "bitcoind has gone backwards". Reruns on this head and on master pass, so it's a pre-existing race, not this PR. Needs its own issue.

Tested: pinned.nix, versions.json, docs/versions-table.md regenerate identically; nixpkgs rtl/trustedcoin build from the upstream tags with the binary paths the modules use; unstable trezor closure has no python-ecdsa and ships trezorctl; Python plugins build; eval on both systems; trustedcoin VM scenario (not in CI) and a forced local rebuild of default pass (CI skipped the scenario matrix because this tree's results were already cached).

Assisted-by: Claude Code (Claude Fable 5.1)

Replace the local RTL derivation and update script with RTL from the locked nixpkgs-unstable input, retaining version 0.15.16. Update the generated version records and developer documentation.

Remove the direct packages and legacyPackages RTL exports to match other pinned packages. Document legacyPackages.<system>.pinned.rtl as the replacement in the upgrade notes. Default service configurations require no changes.

Validated the ARM64 package build target, module configuration checks, version consistency, and export selection on both supported systems. Flake checks and shellcheck also passed during this change. VM integration tests were unavailable because Docker has no KVM.

Assisted-by: Codex (GPT-6)
Replace the local TrustedCoin derivation and hash update script with the package from the locked nixpkgs-unstable input, retaining version 0.8.7. Regenerate the version records and update developer package examples.

Remove the direct packages and legacyPackages exports to match other pinned packages. Document legacyPackages.<system>.pinned.trustedcoin as the replacement in the upgrade notes. Default plugin configurations require no changes.

Validated the ARM64 package build target (fetched from cache), module checks, version consistency, flake checks, and shellcheck. Verified the exports and default plugin package on both supported systems. VM integration tests were unavailable because Docker has no KVM.

Assisted-by: Codex (GPT-6)
Replace the local pyln-bolt7, pyln-client, pyln-proto and pylightning recipes with pkgsUnstable.python3Packages through the existing nbPython3Packages aliases. At the locked revision these use Python 3.14, pyln-bolt7 1.0.246 and the CLN 26.06.9 Python libraries independently of the daemon version.

Use the matching interpreter for Python plugins and remove the monitor packaging dependency relaxation, which unstable no longer needs. Document how custom Python environments select that interpreter in the upgrade notes. Built-in plugins require no configuration changes. HWI and Trezor retain their existing derivations.

Validated the four package build targets (cached), combined library imports, all four Python plugin builds and manifest checks, version consistency, flake checks and shellcheck. Confirmed unstable package selection on both supported systems. VM integration tests were unavailable without KVM.

Assisted-by: Codex (GPT-6)
Select Trezor from nbPython3Packages in the hardware-wallet module and remove the stable-package override that relaxed the keyring requirement. The locked unstable package provides Trezor 0.20.2 with keyring 25.7.0 and has no python-ecdsa in its runtime closure. Keep the separate HWI ECDSA exception.

Document the replacement for the removed pyPkgs.nbPython3PackagesWithUnlockedEcdsa.trezor reference in the upgrade notes. The hardware-wallet module selects the new package automatically.

Validated the ARM64 package target (cached), trezorctl --version, the runtime closure, module selection on both supported systems, version consistency and flake checks. VM integration tests were unavailable without KVM.

Assisted-by: Codex (GPT-6)
Move the four package and flake-attribute notes out of the config-version upgrade guide, where no migration notice points to them. Add a release-notes page and link it from the upgrading guide and book navigation.

Validation: mdBook build and git diff --check passed.

Assisted-by: Codex (GPT-6)
Explain when package and flake-attribute changes belong in release notes and retain config-version notices for breaking configuration and runtime changes. Add release preparation guidance and links from the README and documentation introduction, with a link back to the upgrading guide.

Validation: mdBook build, added local documentation links, and git diff --check passed.

Assisted-by: Codex (GPT-6)
Remove the 0.1.5 config-version notice for the clnrest package rename: default configurations select the new package automatically. Move the package-reference instructions into the 0.1.5 release notes and remove clnrest from the upgrade section summary.

Validation: ARM64 module-config check, nix flake check --all-systems, mdBook build, generated documentation link, and git diff --check passed. VM integration tests were not run.

Assisted-by: Codex (GPT-6)
@prusnak
prusnak merged commit 7a2fb76 into master Nov 10, 2026
20 checks passed
@prusnak
prusnak deleted the packages-upstream branch November 10, 2026 11:09
viberaven added a commit to viberaven/bitcoinix that referenced this pull request Nov 10, 2026
Preserve the package migrations from bitcoinix#245, describe the TrustedCoin initialization override on the nixpkgs package, and link the 0.1.6 system migration from the release notes.

Assisted-by: Codex (gpt-6-astra)
viberaven added a commit to viberaven/bitcoinix that referenced this pull request Nov 10, 2026
Remove the generated pinned.nix file and derive version reporting from the actual selected packages and overrides. Retain public .pinned paths and the non-flake lock-file adapter.

Move the unstable-system and nspawn notices, upgrade guide, example configVersion and migration checks to 0.2.0. Keep the package changes inherited from bitcoinix#245 under their 0.1.6 release notes.

Assisted-by: Codex (gpt-6-astra)
viberaven added a commit to viberaven/bitcoinix that referenced this pull request Nov 13, 2026
Preserve the package migrations from bitcoinix#245, describe the TrustedCoin initialization override on the nixpkgs package, and link the 0.1.6 system migration from the release notes.

Assisted-by: Codex (gpt-6-astra)
viberaven added a commit to viberaven/bitcoinix that referenced this pull request Nov 13, 2026
Remove the generated pinned.nix file and derive version reporting from the actual selected packages and overrides. Retain public .pinned paths and the non-flake lock-file adapter.

Move the unstable-system and nspawn notices, upgrade guide, example configVersion and migration checks to 0.2.0. Keep the package changes inherited from bitcoinix#245 under their 0.1.6 release notes.

Assisted-by: Codex (gpt-6-astra)
viberaven added a commit to viberaven/bitcoinix that referenced this pull request Nov 16, 2026
Preserve the package migrations from bitcoinix#245, describe the TrustedCoin initialization override on the nixpkgs package, and link the 0.1.6 system migration from the release notes.

Assisted-by: Codex (gpt-6-astra)
viberaven added a commit to viberaven/bitcoinix that referenced this pull request Nov 16, 2026
Remove the generated pinned.nix file and derive version reporting from the actual selected packages and overrides. Retain public .pinned paths and the non-flake lock-file adapter.

Move the unstable-system and nspawn notices, upgrade guide, example configVersion and migration checks to 0.2.0. Keep the package changes inherited from bitcoinix#245 under their 0.1.6 release notes.

Assisted-by: Codex (gpt-6-astra)
unbeholdendev added a commit to unbeholdendev/infra that referenced this pull request Nov 17, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [bitcoinix/bitcoinix](https://github.com/bitcoinix/bitcoinix) | patch | `v0.1.5` → `v0.1.6` |

---

### Release Notes

<details>
<summary>bitcoinix/bitcoinix</summary>

### [`v0.1.6`](https://github.com/bitcoinix/bitcoinix/releases/tag/v0.1.6): bitcoinix 0.1.6

[Compare Source](bitcoinix/bitcoinix@v0.1.5...v0.1.6)

**Security release with breaking changes.** Narrows Tor enforcement to local addresses, closes a netns-isolation bypass, hardens RTL and the custom lnd macaroons, and updates lnd to 0.21.8-beta. All users should upgrade. Evaluation fails with a message for each breaking change that affects your config; act on it, then set `nix-bitcoin.configVersion = "0.1.6";`. Deploying restarts every netns-isolated service and each RTL backend once.

#### Security

- **Tor enforcement allowed more than Tor.** Services with `tor.enforce` and charge-lnd could reach every link-local address `169.254.0.0/16`, including a cloud provider's metadata service, and could resolve names through the host's resolver sockets. They now reach only localhost and, with netns-isolation, the namespace subnet, and can't use the nscd, systemd-resolved, D-Bus and Avahi sockets ([#&#8203;264](bitcoinix/bitcoinix#264), [GHSA-cgh8-4w2p-8fr8](GHSA-cgh8-4w2p-8fr8)).
- **netns-isolation:** with `br_netfilter` loaded, which Docker does, a service without `tor.enforce` could reach the listeners of namespaces it isn't connected to. Traffic between namespaces is no longer masqueraded ([#&#8203;239](bitcoinix/bitcoinix#239)).
- **RTL verifies its backends.** RTL sent the lnd admin macaroon and the clightning admin rune to any server on a backend's port. It now requires the backend's pinned TLS certificate ([#&#8203;258](bitcoinix/bitcoinix#258)) and stops when lnd or clightning stops, instead of polling a port that another local user could take over ([#&#8203;250](bitcoinix/bitcoinix#250)).
- **RTL two-factor authentication survives restarts.** Before, each restart turned 2FA off without a warning. `RTL-Config.json`, which holds the 2FA secret, is now readable only by RTL's user ([#&#8203;254](bitcoinix/bitcoinix#254)).
- **Custom lnd macaroons** (`services.lnd.macaroons`, used by BTCPay Server and charge-lnd) are now readable only by their `user`. Before, the user's primary group could read them, which for `operator` is `users`, so other normal users could. If other users log in to your node, [revoke all macaroons](https://docs.bitcoinix.net/services.html#revoke-all-macaroons) ([#&#8203;255](bitcoinix/bitcoinix#255)). Each custom macaroon now has its own root key, so one can be revoked without the others ([#&#8203;236](bitcoinix/bitcoinix#236)).
- **Root scripts no longer load config files from a service user's home.** The lnd user could make root's `curl` and `jq` load `~/.curlrc` and `~/.jq` from lnd's data dir ([#&#8203;241](bitcoinix/bitcoinix#241), [GHSA-cwmc-wjvh-3qp6](GHSA-cwmc-wjvh-3qp6)).
- **Backups fail when a database dump fails.** Before, duplicity succeeded without the database. With `services.postgresqlBackup.compression` set to `"zstd"` or `"none"`, backups left out the BTCPay and NBXplorer databases; they are now included, so run `systemctl start duplicity` after upgrading if you use one of these ([#&#8203;225](bitcoinix/bitcoinix#225)).
- **Multipath TCP:** service namespaces now copy the host's `net.mptcp.enabled`, so the setting of `hardened-extended` reaches netns-isolated services ([#&#8203;206](bitcoinix/bitcoinix#206)).
- **Secrets:** `setup-secrets` rejects empty secret files, and secret generation no longer replaces an empty TLS, WireGuard or replication SSH key ([#&#8203;244](bitcoinix/bitcoinix#244)).
- **WireGuard preset:** evaluation fails for firewall setups in which the preset's rules can't run or don't stay loaded ([#&#8203;188](bitcoinix/bitcoinix#188)).
- **lnd [0.21.8-beta](https://github.com/lightningnetwork/lnd/blob/master/docs/release-notes/release-notes-0.21.8.md)** fixes correctness bugs in channel state persistence, gossip validation, the sweeper and HTLC recovery ([#&#8203;263](bitcoinix/bitcoinix#263)).

#### Breaking changes

- **Tor enforcement:** a service with `tor.enforce` that connects to a non-local address or by host name needs a change. netns-isolation rejects `addressblock` 169 and 170 ([#&#8203;264](bitcoinix/bitcoinix#264)).
- **Onion address access:** `lndconnect.onion` and `clnrest.lnconnect.onion` give the operator user access only when `nix-bitcoin.operator.enable` is set. `nix-bitcoin.onionAddresses.access` accepts only users that are defined and enabled in `users.users` ([#&#8203;170](bitcoinix/bitcoinix#170)).
- **Secrets:** an empty or non-regular secret file now fails `setup-secrets`, and then no service can read its secrets. Check before deploying: `find /etc/nix-bitcoin-secrets -maxdepth 1 -type f -empty`. Set `nix-bitcoin.secrets.<name>.allowEmpty = true` for a secret that may be empty ([#&#8203;244](bitcoinix/bitcoinix#244)).
- **lnd wallet:** lnd stops when `wallet.db` isn't a regular file, or when its seed file is a symlink to a missing file while it has no wallet ([#&#8203;244](bitcoinix/bitcoinix#244)).
- **lnd macaroons:** bitcoinix deletes unused root keys with IDs `0x6e62000000000000` to `0x6e62ffffffffffff` on each lnd start; check `lncli listmacaroonids` before deploying. lnd's `no-macaroons` option isn't supported. Restart services that read a custom macaroon only at startup ([#&#8203;236](bitcoinix/bitcoinix#236)). A program that read a custom macaroon through the group needs its own macaroon ([#&#8203;255](bitcoinix/bitcoinix#255)).
- **RTL:** with both backends enabled, stopping one stops RTL for both ([#&#8203;250](bitcoinix/bitcoinix#250)). `LN_SERVER_URL`/`LND_SERVER_URL`, another `Settings.lnServerUrl`, a proxy without `no_proxy` for the backend, and servers with a self-signed certificate no longer work as before ([#&#8203;258](bitcoinix/bitcoinix#258)).
- **WireGuard preset:** fails evaluation with the nftables firewall package without iptables, with `networking.nftables.flushRuleset`, and with an `ip` or `ip6` table named `filter` in `networking.nftables.tables` ([#&#8203;188](bitcoinix/bitcoinix#188)).
- **extra-container [1.0.1](https://github.com/extra-container/extra-container/releases/tag/v1.0.1):** containers can no longer reach the host's Nix daemon socket, so `nix build`, `nix run`, `nix develop` and `nix-shell` fail inside them. `extra.hostNixDaemon = true;` restores the old behavior; read the security section of the extra-container README first ([#&#8203;211](bitcoinix/bitcoinix#211)).
- **Packages:** `rtl` and `trustedcoin` moved to `legacyPackages.<system>.pinned`. Trezor is `nix-bitcoin.pkgs.nbPython3Packages.trezor`. `nbPython3Packages` uses the Python interpreter of nixpkgs-unstable, so build custom Python environments with `nbPython3Packages.python` ([#&#8203;245](bitcoinix/bitcoinix#245)).
- **nodeinfo:** every bitcoinix update now produces a new system generation, because the revision is part of the script. Set `nix-bitcoin.revision = null;` to opt out ([#&#8203;243](bitcoinix/bitcoinix#243)).

See [Upgrading to config version 0.1.6](https://docs.bitcoinix.net/upgrading.html#upgrading-to-config-version-016).

#### New

- **[Unbeholden Wallet](https://docs.bitcoinix.net/services.html#connect-to-unbeholden-wallet):** a watch-only wallet that runs in the browser and hands transactions to an air-gapped signer over QR codes. Enable it with `services.unbeholden-wallet.enable = true;` ([#&#8203;230](bitcoinix/bitcoinix#230)).
- **nodeinfo** shows the bitcoinix revision and the package version of each service. `nodeinfo --version` prints only the revision, `nodeinfo NAME ...` only the given entries ([#&#8203;243](bitcoinix/bitcoinix#243)).

#### Fixes

- lnd announces its onion address with the port Tor forwards. With a `services.lnd.port` other than 9735, peers couldn't reach the node over Tor ([#&#8203;228](bitcoinix/bitcoinix#228)).
- clnrest replaces an empty or `null` admin rune on start. Generate connection URLs from `lnconnect-clnrest` again if they were created with such a rune ([#&#8203;217](bitcoinix/bitcoinix#217)).
- btcpayserver with the clightning backend joins `services.clightning.group`, so a custom group works ([#&#8203;238](bitcoinix/bitcoinix#238)).
- The lnd seed and electrs index migration steps keep the data when an earlier step fails ([#&#8203;242](bitcoinix/bitcoinix#242)).

#### Updates

| Package                       | 0.1.5       | 0.1.6                                                                            |
| ----------------------------- | ----------- | -------------------------------------------------------------------------------- |
| lnd                           | 0.21.6-beta | [0.21.8-beta](https://github.com/lightningnetwork/lnd/releases/tag/v0.21.8-beta) |
| RTL                           | 0.15.16     | [0.15.17](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.15.17)       |
| extra-container (flake input) | 0.17        | [1.0.1](https://github.com/extra-container/extra-container/releases/tag/v1.0.1)  |
| Unbeholden Wallet             | –           | [0.4.0](https://github.com/unbeholdendev/unbeholden-wallet/releases/tag/v0.4.0)  |

Also: mempool builds with Node.js 24 ([#&#8203;246](bitcoinix/bitcoinix#246)); the docs say what netns-isolation doesn't isolate ([#&#8203;237](bitcoinix/bitcoinix#237)) and how to close public SSH without losing access ([#&#8203;234](bitcoinix/bitcoinix#234)).

Contributors: [@&#8203;msgilligan](https://github.com/msgilligan), [@&#8203;ostermayer](https://github.com/ostermayer), [@&#8203;prusnak](https://github.com/prusnak), [@&#8203;seberm](https://github.com/seberm), [@&#8203;unbeholdendev](https://github.com/unbeholdendev), [@&#8203;viberaven](https://github.com/viberaven).

Full changes: <bitcoinix/bitcoinix@v0.1.5...v0.1.6>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDEuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjI0MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: agent <[email protected]>
Reviewed-on: https://git.home.unbeholden.dev/unbeholden/infra/pulls/140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: modules modules/ and pkgs/lib.nix area: packages pkgs/ and flake pins type: removal Module, package or option dropped (implies breaking)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants