Commit Graph
100 Commits
Author SHA1 Message Date
Erik Arvstedt 343bf4731c charge-lnd: remove electrum server support
This has been removed upstream:
https://github.com/accumulator/charge-lnd/commit/481ccf5282ca980435267870172a0d7f14ef6939
2025-05-25 13:28:21 +02:00
Erik Arvstedt b111cf9c57 update nixpkgs
btcpayserver: 2.1.0 -> 2.1.1
charge-lnd: 0.2.13 -> 0.3.0
clightning: 25.02.1 -> 25.02.2
2025-05-25 12:02:31 +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 44662a8fa5 trustedcoin: 2024-11-15 -> 0.8.4 2025-05-22 10:42:46 +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 742eb2e401 nbxplorer: init at 2.5.26
Backport of https://github.com/NixOS/nixpkgs/pull/407336
Fixes https://github.com/MetacoSA/NBitcoin/pull/1269
2025-05-15 22:34:31 +02:00
Erik Arvstedt 69090cddfa pinned pkgs: add bitcoind-knots 2025-05-13 00:00:54 +02:00
Erik Arvstedt 411b131c3a test: remove clightning plugin start timeout patch
Unneded because the timeout has been increased upstream:
https://github.com/ElementsProject/lightning/commit/ee3133f19885269985180bd20e0b9737c70cf86c
2025-05-09 13:56:33 +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 ac86e67c85 clnrest: init at 0.2.0 2025-05-08 23:59:08 +02:00
Erik Arvstedt 8f99c63303 update nixpkgs
btcpayserver: 1.13.7 -> 2.0.7
nbxplorer: 2.5.17 -> 2.5.23

Co-authored-by: Erik Arvstedt <erik.arvstedt@gmail.com>
2025-03-11 19:36:26 +00:00
Erik Arvstedt 3872f893dc update nixpkgs
electrs: 0.10.8 -> 0.10.9
lnd: 0.18.4-beta -> 0.18.5-beta
nbxplorer: 2.5.16 -> 2.5.17
2025-02-14 15:51:16 +01: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
Erik Arvstedt fe8c6b1e6a dev: add more automation to NixOS version updates
Use the `update-flake.sh` script to auto-update the NixOS version at
various places.

Also update `examples/container/flake.nix` which has been
missing in the update instructions.
2025-01-25 22:24:09 +01:00
Erik Arvstedt 6486bca30f test/README: mention Flakes requirement 2025-01-22 20:48:12 +01:00
Erik Arvstedt b8f6343ee4 fix test persistentContainerExample
This test requires `electrs` to be enabled.

Also, by using `electrs` instead of `clightning` we avoid the bug
where clightning hangs at startup when internet access is unavailable.
Due to technical limititations, internet access is available in NixOS
containers only after the container has started.
2025-01-22 20:41:52 +01:00
Erik Arvstedt b36867c845 examples/container: use faster destroy cmd
This skips evaluating the container system derivation.
2025-01-22 20:31:30 +01:00
Erik Arvstedt b5e5974b8a flake: update extra-container
Adds support for NixOS 24.11
2024-12-14 10:52:27 +01:00
Erik Arvstedt 2d53b57636 tests.py: fix syntax warning
Fixes this warning from the NixOS VM test script linter:
SyntaxWarning: invalid escape sequence '\['
2024-12-14 10:52:27 +01: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 d6bae0a9eb python3Packages.clnrest: update to NixOS 24.11
Gunicorn 22 and 23 mostly include security fixes:
https://github.com/benoitc/gunicorn/releases
2024-12-14 10:52:26 +01:00
Erik Arvstedt b78116b0da python3Packages.clnrest: use --replace-fail 2024-12-14 10:52:26 +01:00
Erik Arvstedt dc8f969eea python3Packages.pyln-proto: update to NixOS 24.11
Cryptography contains no relevant backwards-incompatible changes:
https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst#4300---2024-07-20
2024-12-14 10:52:26 +01:00
Erik Arvstedt 8af7fc4b80 python3Packages.joinmarket: update to NixOS 24.11
- Cryptography contains no relevant backwards-incompatible changes
  https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst#4300---2024-07-20

- Txtorcon 24.8.0 is a minor maintenance release:
  https://github.com/meejah/txtorcon/releases/tag/v24.8.0
2024-12-14 10:52:26 +01:00
Erik Arvstedt c66a6aab3a python3Packages.joinmarket: allow Python 3.12
Python 3.12 is the default in Nixos 24.11.
All tests succeed with Python 3.12.

Context:

Related issue:
https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1589

This issue contains no hints on what changes caused joinmarket to be
incompatible/compatible with Python 3.12.

The restriction to Python <3.12 was added
here (https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1587)
in Oct 2023.

This post
(https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1589#issuecomment-2119278070)
in the above issue mentions on 2024-05-19 that tests are running again
with Python 3.12.

The current joinmarket version (0.9.11) was released on 2024-02-22.
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 a3ded4cf74 update to NixOS 24.11 2024-12-14 10:52:26 +01:00
Erik Arvstedt ba46d20a25 update-flake.sh: add workflow for updating the NixOS version 2024-12-14 10:52:26 +01:00
Erik Arvstedt f60a50607d update-flake.sh: remove support for Nix < 2.19
Nix 2.24 is the default in NixOS 24.11.

This is required by the following commit that uses a `flake update`
command syntax only supported by Nix >= 2.19.
2024-12-13 23:22:22 +01:00
Erik Arvstedt 50cafcaf8e rtl: 0.15.2 -> 0.15.4 2024-12-13 19:50:23 +01:00
Erik Arvstedt daa3bfbae3 lndconnect: add clnrest 2024-11-27 21:35:46 +01:00
Erik Arvstedt 87b929bc99 wireguard-lndconnect: remove obsolete workaround 2024-11-27 21:35:46 +01:00
Erik Arvstedt d682cb95c8 README: remove clightning-rest
`clightning-rest` will be deprecated soon.
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 4e9c153f9c rtl: 0.14.1 -> 0.15.4 2024-11-27 18:48:24 +01:00
Erik Arvstedt e74ddd9464 clightning.plugins.clnrest: init 2024-11-27 18:48:24 +01:00
Erik Arvstedt 76ea066809 trustedcoin: 0.8.2 -> 2024-11-15
Supports bitcoind 28.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 328a28ec9c update nixpkgs
clightning: 24.08 -> 24.08.1
fulcrum: 1.11.0 -> 1.11.1
hwi: 3.0.0 -> 3.1.0
2024-09-23 19:58:47 +02:00
Erik Arvstedt 8e34b25164 btcpayserver: fix lnd with "bind to any" restAddress 2024-08-29 20:34:36 +02:00
Erik Arvstedt 98692a35c1 clboss: use pkg from nixpkgs (0.13.1 -> 0.13.2) 2024-08-16 14:19:19 +02: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
Erik Arvstedt 2a9489ec0b tests/flake: check flake outputs for all systems
Now all `supportedSystems` from flake.nix are checked instead of only
the native system of the `nix flake check` process.
2024-07-20 22:46:57 +02:00
Erik Arvstedt b7bce52da9 examples: fix call to start-bash-session.sh
Ensure that the file relative to the example scripts is called.
Previously, the unqualified call would give precedence to source files in
PATH. This could lead to the wrong file being called when dir
`helper` (containing another file named `start-bash-session.sh`) was in PATH.
2024-07-20 22:41:18 +02:00
Erik Arvstedt 5d0907b064 test/nixos-search: fix running flake-info in an offline environment 2024-07-20 22:41:18 +02:00
Erik Arvstedt 3cc6010658 test/nixos-search/ci-test.sh: remove unneded setup step
Sandbox is off by default in the `docker-nixpkgs` image.
2024-07-20 22:41:18 +02: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 e8e5d8cf4c python3Packages.joinmarket: update to nixos 24.05 2024-07-20 22:39:46 +02:00
Erik Arvstedt 7f8563afec python3Packages.pyln-proto: update to nixos 24.05
- coincurve has been bumped to v20 on pyln-proto master without further
  code changes, so using v19 is fine

- the breaking changes in cryptography 42 don't affect pyln-proto
  https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst
2024-07-18 20:57:00 +02:00
Erik Arvstedt 5d463b1677 treewide: remove buildPythonPackageWithDepsCheck
Requirements checking has been re-enabled in nixos 24.05.
2024-07-18 20:57:00 +02:00
Erik Arvstedt fc703c38c9 treewide: remove obsolete mdDoc 2024-07-18 20:57:00 +02:00
Erik Arvstedt 83eb1de24b update to nixos 24.05 2024-07-18 20:57:00 +02:00
Erik Arvstedt 7daab61431 rtl: remove unused pkg arg 2024-07-15 20:32:26 +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 44addcb5aa treewide: use substituteInPlace --replace-fail
Now substitution failures result in a script error.
This has recently been backported to nixpkgs 23.11.
2024-05-24 14:55:00 +02:00
Erik Arvstedt eafcb36119 clboss: 0.13 -> 0.13.1 2024-05-05 17:29:30 +02:00
Erik Arvstedt 42bae23337 update nixpkgs
bitcoind: 26.1 -> 27.0
lnd: 0.17.4-beta -> 0.17.5-beta
2024-05-05 17:03:34 +02:00
Erik Arvstedt 64e9998f72 update-flake.sh: support Nix >= 2.19 2024-05-03 23:12:32 +02:00
Erik Arvstedt 5730afe48e obsolete-options: add removed clightning plugins 2024-04-09 05:30:23 +00:00
Erik Arvstedt 2c503a9dcf examples: add persistent container example 2024-02-25 23:00:25 +01:00
Erik Arvstedt 73d6d1e8ca dev: move mempool to dev-features.sh
The mempool dev cmd docs are too short for a dedicated file.
2024-01-15 23:27:18 +01:00
Erik Arvstedt d61dc8b8d9 test/README: fix typos 2024-01-15 23:27:18 +01:00
Erik Arvstedt afbd8a3cad test: use nixpkgs-unstable flake input for nix-bitcoin pkgs
By using the `default` flake module for tests, `pkgsUnstable` in
`pkgs/default.nix` gets passed the `nixpkgs-unstable` flake input
instead of falling back to importing `nixpkgsPinned.nixpkgs-unstable`.

For some use cases this prevents importing `nixpkgs-unstable` twice
(once via the `nixpkgs-unstable` flake input, once via
`import nixpkgsPinned.nixpkgs-unstable`).
2024-01-15 23:15:36 +01:00
Erik Arvstedt 98b16a1f6c tests/hardened: fix test for slower hardware 2024-01-15 23:12:06 +01:00
Erik Arvstedt c1a7ab7b2f onion-services: fix markdown code formatting 2024-01-15 23:05:26 +01:00
Erik Arvstedt 4347125344 nix-bitcoin: add example for option pkgOverlays 2024-01-15 23:05:26 +01:00
Erik Arvstedt 7e0d54a19a docs/services: improve lndconnect-wireguard docs 2024-01-15 23:05:25 +01:00
Erik Arvstedt 85bbdb857a python-bitcointx: 1.1.3 -> 1.1.4 2023-12-14 15:00:28 +01:00
Erik Arvstedt 1c07c5fa5c python-packages: add workaround to reenable requirements checking 2023-12-14 14:53:10 +01:00
Erik Arvstedt dc1033f1c8 python-packages/joinmarket: update
- Add `doCheck = false` and `pythonImportsCheck` where appropriate.
  This is good practice in general, but specifically works around a
  `buildPythonPackage` bug where the test phase fails due to a
  requirements check that is unrelated to testing.

- Enable tests for `jmbitcoin`.

- Patch some requirements. I've checked the release notes of the
  required deps for backwards compatibility.
2023-12-14 14:53:10 +01:00
Erik Arvstedt de51f20ccb python-packages/clightning: update 2023-12-14 14:51:12 +01:00
Erik Arvstedt e82da35174 examples/deploy-krops: fix duplicate import error
`qemu-vm.nix` is already imported in `vm-config.nix` but under a
different path.
This causes an "already declared" error on NixOS 23.11.
2023-12-14 14:51:07 +01:00
Erik Arvstedt b110e2aea6 fetch-node-modules: provide CA certs
Without this, the `npm ci` command in `fetchNodeModules` hangs.

It seems that npm didn't check certs previously, because these are
not availble in Nix build environments by default.
2023-12-14 14:50:31 +01:00
Erik Arvstedt 770a4354b4 btcpayserver: fix PostgreSQL 15 user permissions
Since PostgreSQL 15, DB users need to be DB owners to be able to create tables.

We can't use the new `ensureDBOwnerhip` NixOS option [1] to set this up,
because it requires the PostgreSQL user name and the database name to be
identical, which is not the case for btcpayserver.

Instead, we manually issue a PostgreSQL admin statement similar to the one
used by `ensureDBOwnerhip`.

This method of setting up the user is also compatible with older
PostgreSQL versions that come with older NixOS `system.stateVersion`s.

[1] https://github.com/NixOS/nixpkgs/pull/266270
2023-12-12 11:22:38 +01:00
Erik Arvstedt 9efcdaf8bb treewide: use vendorHash for golang drvs
`vendorSha256` has been deprecated.
2023-12-12 11:22:38 +01:00
Erik Arvstedt be2028f2e8 mempool: use recommendedBrotliSettings 2023-12-12 11:22:38 +01:00
Erik Arvstedt 1676445a51 update to NixOS 23.11 2023-12-12 11:22:38 +01:00
Erik Arvstedt 457f066e08 tests/trustedcoin: fix
Sometimes trustedcoin outputs `tip: 0`.
Check for `returning block` instead.
2023-11-28 18:33:27 +00:00
Erik Arvstedt e784e0ceb8 presets/wireguard: make compatible with secure-node preset
Disable Tor enforcement set by the secure-node preset.
2023-11-01 18:29:32 +01:00
Erik Arvstedt 1de259485b mempool: add module 2023-10-31 13:44:04 +01:00
Erik Arvstedt f0bf94cc5a mempool: init at 2.5.0 2023-10-30 11:58:24 +01:00
Erik Arvstedt 8cdedac046 bitcoind-rpc-public-whitelist: add getindexinfo 2023-10-30 11:58:24 +01:00
Erik Arvstedt a66c9992d3 tests/trustedcoin: fix test
Sometimes the trustedcoin plugin prevents clightning from starting up
in an offline environment.
2023-10-23 12:12:29 +00:00
Erik Arvstedt 742fd8fdd0 examples/flake.nix: add inputs.nixpkgs
To make this template look more like a regular system flake.
2023-10-23 11:47:34 +02:00
Erik Arvstedt 89ea349312 examples/flake.nix: add comments and extra service
Like in importable-configuration.nix
2023-10-19 09:48:50 +02:00
Erik Arvstedt 1fad7c730b update nixpkgs
btcpayserver: 1.11.4 -> 1.11.6
fulcrum: 1.9.1 -> 1.9.2
lnd: 0.16.3-beta -> 0.17.0-beta
nbxplorer: 2.3.65 -> 2.3.66

Includes fix for curl CVE-2023-38545 (https://github.com/NixOS/nixpkgs/pull/260381)
2023-10-17 21:10:37 +02:00
Erik Arvstedt fc1466e743 Revert "clightning: don't cleanup socket on startup"
Also, add a detailed comment.

Without this commit, clightning client services may fail to start
due to clightning RPC connection failures.
2023-10-08 21:39:46 +02:00
Erik Arvstedt b63798ff46 rtl: 0.14.0 -> 0.14.1 2023-10-08 20:42:33 +02:00
Erik Arvstedt c14ebd230c clighting-rest: 0.10.5 -> 0.10.7 2023-10-08 20:42:33 +02:00
Erik Arvstedt 90ce68cb16 treewide: ensure services are started after secrets setup
Now all services that access secrets only run after the secrets setup
has finished.

Previously, we assumed that the systemd `after` dependency is
transitive, i.e. that adding an `after = [ "bitcoind.service" ]`
to a service implicitly pulled in the `after` dependency to
`nix-bitcoin-secrets.target` (which is defined for `bitcoind`).
This is not the case. Services could start before secrets setup
had finished, leading to service failure.
2023-10-08 13:56:56 +02:00
Erik Arvstedt 26cc9e4b60 bitcoin: add shell completions
Backport of https://github.com/NixOS/nixpkgs/pull/256091
2023-09-19 14:19:38 +02:00