Commit graph

2196 commits

Author SHA1 Message Date
800afe647f examples: add neutrino backend example for lnd
Some checks are pending
nix-bitcoin tests / build_test_drivers (push) Waiting to run
nix-bitcoin tests / test_scenario (default) (push) Blocked by required conditions
nix-bitcoin tests / test_scenario (joinmarket-bitcoind-29) (push) Blocked by required conditions
nix-bitcoin tests / test_scenario (netns) (push) Blocked by required conditions
nix-bitcoin tests / test_scenario (netnsRegtest) (push) Blocked by required conditions
nix-bitcoin tests / check_flake (push) Waiting to run
Show users how to configure lnd with the neutrino backend instead of
bitcoind. This is useful for resource-constrained systems that can't
run a full Bitcoin node, but provides less privacy and security than
a local bitcoind.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 17:38:21 +01:00
a019f79283 lnd: add neutrino.maxPeers option
Allow configuring the maximum number of inbound and outbound peers
for neutrino. Default is 8, matching lnd's default.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 17:38:02 +01:00
7d06fed28c lnd: rename neutrino.addpeers to neutrino.peers
Use simpler naming for the NixOS option. The option defines which
peers to connect to, not the action of adding them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 17:19:56 +01:00
ab188f03f8 lnd: use optionals instead of optional for list additions
Use optionals with explicit list syntax for requires, after, and
extraGroups. This makes it clearer that we're conditionally adding
elements to a list.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 17:13:26 +01:00
ebd13a2c87 rtl: change default port from 3000 to 3001
Avoid conflict with lamassu-server which also defaults to port 3000.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
9d2884b6f7 lamassu: register module in modules.nix
Without this, the services.lamassu-server option doesn't exist.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
4db5e80ac8 lamassu: document future peer authentication implementation
Upstream lamassu-server doesn't support DATABASE_URL, so peer auth
via Unix socket isn't currently possible. Document the required
upstream changes and module updates for future implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
2b46736e69 Revert "lamassu: switch to peer authentication for PostgreSQL"
This reverts commit a819ec5ad2fef050fd878afde8243576ebaa7f88.
2025-12-24 16:04:37 +01:00
1bbd7d6bc5 lamassu: switch to peer authentication for PostgreSQL
Replace password-based TCP auth with Unix socket peer authentication:
- Remove lamassu-db-password secret (no password needed)
- Remove lamassu-postgres-setup service entirely
- Use DATABASE_URL with Unix socket: postgresql://user@/db?host=/run/postgresql
- Remove POSTGRES_HOST, POSTGRES_PORT, POSTGRES_PASSWORD env vars

This follows the same pattern as btcpayserver and simplifies the module
significantly. Peer auth uses OS-level user authentication via Unix socket.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
27f133efd8 lamassu: use nix-bitcoin secrets for database password
Replace hardcoded database password with nix-bitcoin secrets pattern:
- Add lamassu-db-password secret (readable by lamassu user and postgres)
- Generate random 20-char password using makePasswordSecret
- Read password at runtime in service wrapper scripts
- Update lamassu-postgres-setup to read password from secrets
- Update helper scripts to read password at runtime

The password is now automatically generated on first deploy and stored
in ${secretsDir}/lamassu-db-password.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
8ee71833b9 lamassu: clarify hostname option and add TODO for certificate redundancy
The hostname is embedded in the pairing QR code and tells ATMs where to
connect. Added a TODO to consider auto-populating certificate.extraIPs
from hostname when it's an IP address.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
a7d96d2d2e lamassu: simplify to production mode only, document future nginx support
Current state:
- Admin UI runs on port 443 (hardcoded in upstream)
- devMode and nginx options commented out (would conflict with port 443)
- adminPort option removed (not configurable in upstream)

Future implementation documented in docs/lamassu-future-nginx.md:
- Add --ui-port flag to upstream lamassu-server
- Re-enable devMode, adminPort, and nginx options
- Allow nginx as reverse proxy on 443 with admin UI on internal port

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
c5fcf567d8 lamassu: pass --port to main server
The serverPort option was not being passed to lamassu-server,
so the port was always defaulting to 3000 regardless of config.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
1383421991 lamassu: fix misleading adminPort option
- Clarify adminPort is only used in dev mode (port 8070)
- Production mode always uses port 443 (hardcoded upstream)
- Remove unused ADMIN_SERVER_PORT env var (not read by upstream)
- Fix status script to show correct port and use https

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
471a4d982f lamassu: integrate with nix-bitcoin secrets system for TLS certificates
- Replace runtime SSL generation with nix-bitcoin secrets integration
- Add certificate.extraIPs and certificate.extraDomains options (same pattern as LND)
- Certificates auto-regenerate when SAN configuration changes
- Add certPath and keyPath read-only options
- Update nginx and services to use secrets from secretsDir
- Add nix-bitcoin-secrets.target dependency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
e3db3e58b9 add lamassu-lnbits module 2025-12-24 16:04:37 +01:00
ac4100f50f lnd: add fee.url for neutrino on mainnet
Neutrino doesn't have access to mempool data, so LND requires an
external fee estimation URL when running on mainnet. Add feeUrl
option with Lightning Labs endpoint as default.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
8763003ace lnd: fix preStart empty block when using neutrino
When using neutrino backend with no getPublicAddressCmd, the bash
block was empty causing a syntax error. Use individual appends instead.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
b0076a2e1d lnd: add neutrino backend support
Add option to use neutrino instead of bitcoind for fetching blockchain
data. This allows running LND as a lightweight client that connects to
remote Bitcoin full nodes via P2P protocol.

New options:
- services.lnd.backend: choose between "bitcoind" (default) or "neutrino"
- services.lnd.neutrino.addpeers: list of Bitcoin node peers to connect to

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
4f4cb34837 docs: update install.md for NixOS 25.11
- Update NixOS ISO version from 24.05 to 25.11
- Fix version mismatch between download and copy commands
- Update Nix installer to use current official method
- Fix deprecated permitRootLogin -> settings.PermitRootLogin
- Update download URL to nixos.org/download/

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 16:04:37 +01:00
Jonas Nick
f1ebb5d2cd
Merge fort-nix/nix-bitcoin#819: Update nixpkgs
e6e3a13dbb work around CVE-2024-23342 for pkgs `hwi`, `trezor` (Erik Arvstedt)
c4cd252753 update nixpkgs (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK e6e3a13dbb

Tree-SHA512: f0f5bcbe0ea28f5870aed7bd983904fe3d57aedad45955835ace1fb151f48f169977f453d41a071b60e0e27af6fc92572c629627dfc8d81012c0bb4241a7f459
2025-11-24 12:50:28 +00:00
Erik Arvstedt
e6e3a13dbb
work around CVE-2024-23342 for pkgs hwi, trezor 2025-11-22 15:21:32 +01:00
Erik Arvstedt
c4cd252753
update nixpkgs
bitcoind-knots: 29.2.knots20251010 -> 29.2.knots20251110
clightning: 25.09 -> 25.09.2
lightning-loop: 0.31.2-beta -> 0.31.5-beta
2025-11-22 15:21:32 +01:00
Jonas Nick
b217b6019c
Merge fort-nix/nix-bitcoin#818: Add bitcoind 29.2
4442e87ff2 bitcoind: 29.1 -> 29.2 (Erik Arvstedt)
944bd8ed9b bitcoind: init at 29.1 (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 4442e87ff2

Tree-SHA512: 0af97a7c95c6fd9536a8ce724a13291a920476cb6145a9db4ff883e378465524f9e57c5b2122d19e7286f0bdb14834d1fc76e8cd8185dad73dfa893535833f2f
2025-10-27 10:14:10 +00:00
Erik Arvstedt
4442e87ff2
bitcoind: 29.1 -> 29.2 2025-10-27 10:31:29 +01:00
Erik Arvstedt
944bd8ed9b
bitcoind: init at 29.1
bitcoind 29.x is required for joinmarket.
nixos-25.05 is at 29.0, which is a regression from 29.1.
nixos-unstable is at 30.0, which is incompatible.

Adapted from nixpkgs `96ff46705a694219cefa5155ba52203d9d32e65e`, with
minor modifications to make it compatible with nixos 25.05.
2025-10-27 10:31:27 +01:00
Jonas Nick
38dd352991
Merge fort-nix/nix-bitcoin#812: Update nixpkgs
bba75b0a7f support running joinmarket with bitcoind 29 (Erik Arvstedt)
1c786d67c6 update nixpkgs (Erik Arvstedt)
3a13b5f77c ci/test-info.nix: read scenarios from github workflow file (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK bba75b0a7f

Tree-SHA512: 420be622af97a7879eb4f8b0705726185994398ad89b8483eef1821b7a586b70da6200f8a562b434ca5d87fff56be39f56b606e107e5dff49278dd8b0524f52d
2025-10-23 14:55:03 +00:00
Erik Arvstedt
bba75b0a7f
support running joinmarket with bitcoind 29 2025-10-23 08:15:34 +02:00
Erik Arvstedt
1c786d67c6
update nixpkgs
bitcoin: 29.1 -> 30.0
bitcoind: 29.1 -> 30.0
bitcoind-knots: 29.1.knots20250903 -> 29.2.knots20251010
clboss: 0.14.1 -> 0.15.1
2025-10-23 08:15:34 +02:00
Erik Arvstedt
3a13b5f77c
ci/test-info.nix: read scenarios from github workflow file
Simplifies maintenance, both files no longer need to be kept in sync.
2025-10-21 07:10:47 +02:00
Jonas Nick
dedbacf35e
Merge fort-nix/nix-bitcoin#810: update nixpkgs
14d0b33d20 update nixpkgs (Jonas Nick)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 14d0b33d20

Tree-SHA512: c055e49ed5132510e97209965fea0c8fc9638de5b8099adedfd9e325cfc142b30dfd43ed50a669e7f204faca361c40f8304c5783810ae2f38d042fef256d48a5
2025-10-07 12:15:21 +00:00
Jonas Nick
14d0b33d20
update nixpkgs
bitcoind-knots: 28.1.knots20250305 -> 29.1.knots20250903
charge-lnd: 0.3.0 -> 0.3.1
clightning: 25.05 -> 25.09
2025-10-07 09:19:22 +00:00
Jonas Nick
0c961fa789
Merge fort-nix/nix-bitcoin#809: Update nixpkgs
81ac8735bd update nixpkgs (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 81ac8735bd

Tree-SHA512: 0ad8cb2cc30653158a2fce3749d20b76dc0965b3dc110bfbb41cb4f49bd7a5bca164a0415d9d9110cd395790dbe0268f4abc056745cd378027af40f76e36b75d
2025-09-14 18:56:24 +00:00
Erik Arvstedt
81ac8735bd
update nixpkgs
bitcoind: 29.0 -> 29.1
btcpayserver: 2.1.6 -> 2.2.1
2025-09-12 09:11:04 +02:00
Jonas Nick
508a26f1f1
Merge fort-nix/nix-bitcoin#808: rtl: 0.15.5 -> 0.15.6
454f6ad9fa rtl: 0.15.5 -> 0.15.6 (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 454f6ad9fa

Tree-SHA512: 075ac5330f4b32218829779e97094de354195fcc143b8b5ac1bd0be1fdf2a357290ebf0a5661d18df5177b095b37c7f0e41b80c0b18afdf7793c9543a52e0a27
2025-09-11 06:28:26 +00:00
Erik Arvstedt
454f6ad9fa
rtl: 0.15.5 -> 0.15.6 2025-09-10 11:00:02 +02:00
Jonas Nick
54221ac13f
Merge fort-nix/nix-bitcoin#807: Update nixpkgs
0c02330001 update nixpkgs (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 0c02330001

Tree-SHA512: 97d171691937fe0ea2474e7b09267d63b07bd0cd0b4c724d8cddde5db1b8a6df383410be213c6e11e9691cbc1fa21e8f6e85455e09765b1be7e9dc56cf618bb8
2025-09-07 08:35:29 +00:00
Erik Arvstedt
0c02330001
update nixpkgs
lnd: 0.19.2-beta -> 0.19.3-beta
2025-09-05 20:44:09 +02:00
Jonas Nick
21442ea33f
Merge fort-nix/nix-bitcoin#806: run-tests: Fix tmpDir being deleted before it's used
6bc5747951 run-tests: fix `tmpDir` being deleted before it's used (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 6bc5747951

Tree-SHA512: 7767634bc098faac5cfeb14d1800f24df89a1ea5d56fe894338ae2d2871c3293a8bafc62ee61b5cb7f9f658b02c2a52bc7f82b86f69d20d1dae86cc6bfe004b3
2025-08-19 07:23:02 +00:00
Jonas Nick
0451ee698c
Merge fort-nix/nix-bitcoin#802: trustedcoin: 0.8.4 -> 0.8.6
904fd2e2b6 trustedcoin: 0.8.4 -> 0.8.6 (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 904fd2e2b6

Tree-SHA512: e19c0185d8cdbd2f5d07f06a8397f0d804ed8b364fc19c3ad76cf6a3fa321c07d7fafedabab4c7ea4aaad69501fc8cc07172fd73e37d2ebe0f1e2d8acac12246
2025-08-19 07:07:47 +00:00
Erik Arvstedt
6bc5747951
run-tests: fix tmpDir being deleted before it's used
In `buildTests`, `nixInstantiate` is called in a subshell.
When `tmpDir` is unset before the call, the tmpdir is created in the
subshell and gets deleted before subshell exit (via `trap`).
But subsequent code accesses the tmpdir, which has now been deleted,
leading to an error.

This bug has been undetected for a long time because bash 5.2 has a
bug [1] where `trap` is not always executed, causing the tmpdir to never be deleted.
Bash 5.3 (introduced in NixOS 25.05) now works correctly and exposes the bug.

Fix it by creating the tmpdir before the subshell call.

[1] https://mail.gnu.org/archive/html/help-bash/2024-07/msg00007.html
2025-08-18 13:28:00 +02:00
Erik Arvstedt
904fd2e2b6
trustedcoin: 0.8.4 -> 0.8.6 2025-08-18 13:20:49 +02:00
Jonas Nick
5deb0b4342
Merge fort-nix/nix-bitcoin#801: Update nixpkgs
da2a683393 update nixpkgs (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK da2a683393

Tree-SHA512: c2923fd8f0d17c865198733e60c74659628accbf10b6afd259e188b33f167abfba54964165579269fafb3fe46643479f02dde7f7f2a4f9232a697d34960329df
2025-08-16 07:28:38 +00:00
Jonas Nick
db83817863
Merge fort-nix/nix-bitcoin#805: examples/configuration.nix: Improve secure-node preset documentation
874b214707 examples/configuration.nix: improve `secure-node` preset documentation (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 874b214707

Tree-SHA512: e5d201b5cd267a6d48545a008348d207b29cae82b7a6b4c921c33378f19f252e3b90141b9285ccd3edebeb818ec5190c4dd6c473546492d00cc61670ce3b2d74
2025-08-15 20:24:18 +00:00
Jonas Nick
b59764d37e
Merge fort-nix/nix-bitcoin#803: CI: Group job output, print eval results
9f8dc58f85 ci: group job output, print eval results (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 9f8dc58f85

Tree-SHA512: 732c3f65c49a4e0b92d050189721c8b3e244224aad37f9e602103acb252c6e3464a61128689df9de20e52a77df53490de9b51986e00f40d65386f4fd34f1d39e
2025-08-15 15:41:50 +00:00
Erik Arvstedt
874b214707
examples/configuration.nix: improve secure-node preset documentation
Explicitly import modules.nix, so that users can remove the
secure-node.nix import.
2025-08-14 13:21:11 +02:00
Erik Arvstedt
9f8dc58f85
ci: group job output, print eval results
Useful for debugging.
2025-08-11 22:15:48 +02:00
Erik Arvstedt
da2a683393
update nixpkgs
electrs: 0.10.9 -> 0.10.10
2025-08-10 19:06:23 +02:00
Jonas Nick
5031e25469
Merge fort-nix/nix-bitcoin#800: Update nixpkgs
17f057cb08 update nixpkgs (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 17f057cb08

Tree-SHA512: 9cbfe378ca9487ec667c1dac0f74dfac3eeaa61e2580fe557ba84e9801adedac10e63044f6e26bef8cdfffb3809999046f7ff017289f9d2c5753bffd13c30dda
2025-07-21 06:23:57 +00:00
Erik Arvstedt
17f057cb08
update nixpkgs
btcpayserver: 2.1.5 -> 2.1.6
lnd: 0.19.1-beta -> 0.19.2-beta
2025-07-20 22:50:22 +02:00