Commit graph

2190 commits

Author SHA1 Message Date
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
Jonas Nick
b53eefd78e
Merge fort-nix/nix-bitcoin#799: rtl: 0.15.4 -> 0.15.5
84028a238d rtl: 0.15.4 -> 0.15.5 (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 84028a238d

Tree-SHA512: 747bf94c1f8a15af9973b61292a150f0971c68d5ef3e344c4a7e7ce2c3a6e81740e68c81548141a108c58963e73c183d9e4385106f47772fab5027d89309ad2e
2025-07-16 20:18:36 +00:00
Erik Arvstedt
84028a238d
rtl: 0.15.4 -> 0.15.5 2025-07-09 16:00:59 +02:00
Jonas Nick
e2ca2e4967
Merge fort-nix/nix-bitcoin#795: CI: Switch from Cirrus to Github Actions
5516bcc43b ci: switch from Cirrus to Github Actions (Erik Arvstedt)
7d33e9d5e9 tests: extract fn `instantiateTestsFromStr` (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 5516bcc43b

Tree-SHA512: 1aa23ffc52c8e9b7efd38fbf31be9bab7a7e187571c6bee8c1dbdb8eb14f90995b260d10f0d3d9968d6e9be1be452d22173d9775fd6d42a94a01f41ab3305d21
2025-07-03 08:16:40 +00:00
Jonas Nick
aec8331f26
Merge fort-nix/nix-bitcoin#793: Update nixpkgs
042f4af4fa update nixpkgs (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 042f4af4fa

Tree-SHA512: a46a00ad1bc04c1774818340a4528f811bbfdcdf81cb50b1a33fcfb2f6984ea395a603df3b9830e9e06f0a46813a0504af6312a504716cbfda3789b09e51804c
2025-07-02 08:25:56 +00:00
Erik Arvstedt
042f4af4fa
update nixpkgs
btcpayserver: 2.1.1 -> 2.1.5
clightning: 25.02.2 -> 25.05
lightning-loop: 0.31.1-beta -> 0.31.2-beta
lnd: 0.19.0-beta -> 0.19.1-beta
2025-06-29 15:10:42 +02:00
Erik Arvstedt
5516bcc43b
ci: switch from Cirrus to Github Actions 2025-06-26 23:26:57 +02:00