Commit graph

831 commits

Author SHA1 Message Date
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
Erik Arvstedt
e6e3a13dbb
work around CVE-2024-23342 for pkgs hwi, trezor 2025-11-22 15:21:32 +01:00
Erik Arvstedt
bba75b0a7f
support running joinmarket with bitcoind 29 2025-10-23 08:15:34 +02:00
Erik Arvstedt
9311fb9a1b
lnd: disable log file, disable log timestamps
This is the default for nix-bitcoin services.
`no-timestamps` has been added in lnd 0.19.0-beta.

Also remove deprecated option `bitcoin.active`.
2025-06-11 16:08:26 +02:00
Jonas Nick
120daaaaa3
Merge fort-nix/nix-bitcoin#787: mempool: 2.5.0 -> 3.2.1
7822e2c9d3 mempool: add frontend settings (Erik Arvstedt)
81112a0553 mempool: 2.5.0 -> 3.2.1 (Erik Arvstedt)
9a044fbfed mempool: remove unneded nginx config files (Erik Arvstedt)
710a92d18c mempool: improve comments (Erik Arvstedt)
d61099a535 mempool: minor refactorings (Erik Arvstedt)
c48b99782d mempool: fix version (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 7822e2c9d3

Tree-SHA512: 50f953a324641fa87f913035d99d2a739c33bb8adca20a5337c0061809ff3e17315bb7761655689b791ef9f53fa3995148ca4d4729bf989074cd52ff41b6f03d
2025-06-09 12:30:24 +00:00
Erik Arvstedt
4763e2e8f0
clightning: increase service start timeout 2025-06-03 11:41:33 +02:00
Erik Arvstedt
7822e2c9d3
mempool: add frontend settings 2025-06-02 10:46:55 +02:00
Erik Arvstedt
81112a0553
mempool: 2.5.0 -> 3.2.1 2025-06-02 10:46:54 +02:00
Erik Arvstedt
9a044fbfed
mempool: remove unneded nginx config files
mempool.conf, nginx.conf were not used in nix-bitcoin.
2025-06-02 10:46:54 +02:00
Erik Arvstedt
710a92d18c
mempool: improve comments 2025-06-02 10:46:54 +02:00
Erik Arvstedt
343bf4731c
charge-lnd: remove electrum server support
This has been removed upstream:
481ccf5282
2025-05-25 13:28:21 +02:00
Erik Arvstedt
c65cfdcbec
bitcoind: remove upper limit of option dbcache
The upper limit has been removed.
See item `The maximum allowed value...` at
https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-29.0.md#updated-settings
2025-05-22 15:04:37 +02:00
Erik Arvstedt
ce6244cc69
clightning: set service as active only after clnrest has started 2025-05-20 22:42:41 +02:00
Erik Arvstedt
a2a0174d0f
bitcoind-rpc-public-whitelist.nixbitcoind-rpc-public-whitelist: add getblockfrompeer
This is used by nbxplorer since v2.5.24 on pruned nodes:
https://github.com/dgarage/NBXplorer/pull/511
2025-05-15 23:11:37 +02:00
Erik Arvstedt
69090cddfa
pinned pkgs: add bitcoind-knots 2025-05-13 00:00:54 +02:00
Erik Arvstedt
815f2cd325
clightning: don't set datadir for bitcoin-cli plugin
This option is unneeded because `bitcoin-cli` auth and connection
settings are already provided by other options like `bitcoin-rpcpassword`.

In bitcoind versions prior to 29.0, option `datadir` (passed by clightning to `bitcoin-cli`)
was therefore ignored.
Since 29.0, option `datadir` is always checked for validity. This causes a
file permission error because service clighting has no access to the
bitcoin datadir. This is now fixed.
2025-05-09 13:56:18 +02:00
Erik Arvstedt
04b6a09be4
clightning-plugins: use clnrest, remove Python version 2025-05-09 13:32:19 +02:00
Erik Arvstedt
4aaef5fdf4
services: use wants dependency where possible
Let A be a service that depends on another service B.
When A can gracefully handle failures and restarts of B, use
```
wants = [ "B.service" ];
after = [ "B.service" ];
```
instead of
```
requires = [ "B.service" ];
after = [ "B.service" ];
```
in the definition of A.

This way, A keeps running when B is stopped or restarted after a failure.
With `requires`, A is instead stopped when B is stopped or restarted due to a failure.

This brings two benefits:

1. Improved uptime
Examples:
- RTL keeps running when one lightning node has failed
- btcpayserver keeps running and accepting on-chain payments when the lightning node has crashed

2. Avoids a systemd bug where depending units (`A.service` in the
above example) are not restarted when their dependency fails
(issue github/systemd#18856, no full link to avoid spamming the issue).
In real world nix-bitcoin deployments, this issue was only likely to
appear when clightning failed during activation, causing depending
units (like `RTL`) to stop and not be restarted.
All services depending on `clightning` have now been changed to use
`wants`, thereby avoiding the bug.

Services `electrs` and `lightning-loop` fail when their respective
dependencies stop, so these services have not been changed.
I also haven't changed services `joinmarket` and
`joinmarket-yieldgenerator`. Further manual testing is needed to
determine if they can be switched to `wants`.
2025-01-29 20:44:26 +01:00
Jonas Nick
ed163fece1
update nixpkgs
bitcoin: 28.0 -> 28.1
bitcoind: 28.0 -> 28.1
clightning: 24.11 -> 24.11.1
electrs: 0.10.7 -> 0.10.8
extra-container: 0.12 -> 0.13
lnd: 0.18.3-beta -> 0.18.4-beta
2025-01-21 16:51:29 +00:00
Erik Arvstedt
09ba739719
nbxplorer: remove deprecated option
Fixes this warning:
Explorer: Options 'automigrate' is obsolete and ignored...
2024-12-14 10:52:26 +01:00
Erik Arvstedt
3ce3a000b2
modules: update to NixOS 24.11 2024-12-14 10:52:26 +01:00
Erik Arvstedt
daa3bfbae3
lndconnect: add clnrest 2024-11-27 21:35:46 +01:00
Erik Arvstedt
ad2a128471
rtl: use clnrest
Using `clightning-rest` is no longer supported by rtl.
2024-11-27 21:35:46 +01:00
Erik Arvstedt
e74ddd9464
clightning.plugins.clnrest: init 2024-11-27 18:48:24 +01:00
Jonas Nick
c0994bfc7b
Merge fort-nix/nix-bitcoin#744: update nixpkgs
2f986c80e5 update nixpkgs (Jonas Nick)
76ea066809 trustedcoin: 0.8.2 -> 2024-11-15 (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 2f986c80e5

Tree-SHA512: 2824fc5f2c0f5586d1912c237a0b129387a913283d70840c6c4020e168bf924814b335796e863a64b97f6d60aced0e65fd10561fb3c1d4a33542dc235df46d25
2024-11-16 14:57:49 +00:00
Jonas Nick
2f986c80e5
update nixpkgs
bitcoin: 27.1 -> 28.0
bitcoind: 27.1 -> 28.0
clboss: 0.13.3 -> 0.14.0
2024-11-15 19:37:56 +01:00
Erik Arvstedt
ca96e1959e
lnd: make ExecStartPost extensible
By wrapping the value in a list, users can add other `ExecStartPost` scripts.
The previous scalar value could only be replaced, but not merged with
other definitions.
2024-11-06 16:48:30 +01:00
Erik Arvstedt
8e34b25164
btcpayserver: fix lnd with "bind to any" restAddress 2024-08-29 20:34:36 +02:00
Jonas Nick
6e208d6a7b
Merge fort-nix/nix-bitcoin#722: joinmarket: Add option settings
cf3f0dbb2d joinmarket: add option `settings` (Erik Arvstedt)
da2e473158 joinmarket: don't set default config options (Erik Arvstedt)
74eb9a17b6 joinmarket/yieldgenerator: add docs link to description (Erik Arvstedt)
5694408d3a joinmarket: remove deleted option `txfee` (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    utACK cf3f0dbb2d

Tree-SHA512: 36754539670dedcc494b28fa8383b189bd8fcf4044e0be624f47db953b189d706ed76df305e10fbea69f4e0dd9c419eb1eaf35de75e860883ea3305456fc31ed
2024-08-13 07:17:49 +00:00
Erik Arvstedt
cf3f0dbb2d
joinmarket: add option settings
Joinmarket settings can now be freely specified.
2024-08-11 20:16:56 +02:00
Erik Arvstedt
da625fc13d
bitcoind.rpc.users: improve example
Add RPC entries that don't exist in the public whitelist.
2024-07-31 18:13:29 +02:00
Erik Arvstedt
a04c15958a
btcpayserver: remove redundant RPC entry from whitelist
`getpeerinfo` already exists in the public whitelist.
2024-07-31 18:13:29 +02:00
Erik Arvstedt
fee9dc8c17
bitcoind-rpc-public-whitelist: add getnodeaddresses
`getnodeaddresses` returns addresses of peers the bitcoind instance
has seen over its lifetime. It's safe for public use.
2024-07-31 18:13:29 +02:00
Erik Arvstedt
da2e473158
joinmarket: don't set default config options
These options are set by default in `jmclient/configure.py` and don't
need to be repeated.

Some options, like those in section `POLICY`, might be assigned more
suitable default values in future joinmarket releases, so don't override
them in nix-bitcoin.
2024-07-29 11:24:37 +02:00
Erik Arvstedt
74eb9a17b6
joinmarket/yieldgenerator: add docs link to description 2024-07-29 11:22:47 +02:00
Erik Arvstedt
5694408d3a
joinmarket: remove deleted option txfee 2024-07-27 19:55:29 +02:00
Jonas Nick
1c6e35e152
Merge fort-nix/nix-bitcoin#718: Update to Nixos 24.05
2a9489ec0b tests/flake: check flake outputs for all systems (Erik Arvstedt)
b7bce52da9 examples: fix call to `start-bash-session.sh` (Erik Arvstedt)
5d0907b064 test/nixos-search: fix running `flake-info` in an offline environment (Erik Arvstedt)
3cc6010658 test/nixos-search/ci-test.sh: remove unneded setup step (Erik Arvstedt)
22c1424552 backups: fix for nixos 24.05 (Erik Arvstedt)
69b3d5f1b3 bitcoind: fix module warning (Erik Arvstedt)
e8e5d8cf4c python3Packages.joinmarket: update to nixos 24.05 (Erik Arvstedt)
7f8563afec python3Packages.pyln-proto: update to nixos 24.05 (Erik Arvstedt)
5d463b1677 treewide: remove `buildPythonPackageWithDepsCheck` (Erik Arvstedt)
fc703c38c9 treewide: remove obsolete `mdDoc` (Erik Arvstedt)
83eb1de24b update to nixos 24.05 (Erik Arvstedt)
7daab61431 rtl: remove unused pkg arg (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 2a9489ec0b

Tree-SHA512: 1e88d52b52050ea39c18570eb22b3b83471ebbf30d7ba77f212947ffaaf80ebb851782aa6a5e42752bdfb0db00fa31d5fb9cebb7f42a50145acfeeef1c1aa934
2024-07-22 13:09:15 +00:00
Erik Arvstedt
22c1424552
backups: fix for nixos 24.05 2024-07-20 22:41:18 +02:00
Erik Arvstedt
69b3d5f1b3
bitcoind: fix module warning
Fix warning:
```
bitcoind.service is ordered after 'network-online.target' but doesn't depend on it
```
2024-07-20 22:41:18 +02:00
Erik Arvstedt
fc703c38c9
treewide: remove obsolete mdDoc 2024-07-18 20:57:00 +02:00
Erik Arvstedt
1f32792d31
bitcoind-rpc-public-whitelist: add getpeerinfo
Required by lnd 0.18.0.
2024-07-08 12:54:56 +02:00
Erik Arvstedt
5730afe48e
obsolete-options: add removed clightning plugins 2024-04-09 05:30:23 +00:00