Commit Graph

141 Commits

Author SHA1 Message Date
Erik Arvstedt
b35d08d3f2
docs: move test docs from examples/README to test/README 2023-01-15 20:28:48 +01:00
Erik Arvstedt
4b5b4eac58
examples/deploy-container: fix sudo env propagation
Env vars can't be reliably passed through `sudo`, so always
call nix-shell to setup the env after running sudo.
2023-01-06 23:23:54 +01:00
Erik Arvstedt
c9b1e59f20
update to NixOS 22.11
This includes no pkg version updates.
2022-12-18 20:01:52 +01:00
Erik Arvstedt
1b5e51b7fe
examples/vm-config: fix syntax error 2022-11-04 00:33:53 +01:00
Erik Arvstedt
565deb770a
examples/minimal-vm: add lightning-cli demo command 2022-11-04 00:33:31 +01:00
Erik Arvstedt
edbaeb9813
tests: define tests via flake
Advantages:
- Pure test evaluations
- The test framework can now be used by flakes that extend nix-bitcoin
- Most features of `run-tests.sh` are now accessible via `nix build`/`nix run`.
  We keep `run-tests.sh` for advanced features like `scenarioOverridesFile` and adhoc scenarios.

Other changes:
- `run-tests.sh` now builds aggregate VM tests like `basic` or
  `buildable` by creating all VMs in a single evaluation.
  This speeds up the tests and eases debugging by separating the eval and build steps.
- Use the new `nix` CLI which has improved build output logging
  by prefixing output lines with the origin drv name.
2022-11-03 23:08:06 +01:00
Erik Arvstedt
73d2fbb448
add compatibility with Nix PR #6530 (Source tree abstraction)
Avoid adding flake resource paths to the store (via string
interpolation).
This reduces performance and can lead to modules getting imported
twice, once through a local path and once through a store path.

This might not be needed in a future Nix release, in which case we can
revert this.
2022-11-03 23:08:05 +01:00
Erik Arvstedt
1d3f49f8da
tests, example: avoid lengthy documentation build
This options manual rebuild takes 30-60s and is triggered by the extra
NixOS options defined by nix-bitcoin.
2022-11-03 23:08:04 +01:00
Otto Sabart
f3f8d650ab
shellcheck: fix the lint warnings for other generated scripts 2022-09-12 21:00:00 +02:00
Otto Sabart
f184bb34e6
shellcheck: fix lint of scripts in tests 2022-08-28 18:25:37 +02:00
Erik Arvstedt
7d5182298b
examples/deploy-krops: fix missing secrets
Previously, `deploy-krops.sh` failed when run in a freshly cloned repo
due to missing secrets.
2022-07-22 16:24:24 +02:00
Jonas Nick
34c4b61402
Merge fort-nix/nix-bitcoin#504: Add fulcrum module
7d7f2df006 fulcrum: add module (Erik Arvstedt)
edd8bd311c bitcoind-rpc-public-whitelist: add `ping`, `help` (Erik Arvstedt)
f946a7cd9b examples: use `mkDefault` for setting `system.stateVersion` (Erik Arvstedt)
79994d0bd2 tests: increase postgresql startup timeout (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK 7d7f2df006

Tree-SHA512: 866f0a40bb81ceb2008e6efbd415eeee201b9e56aa5ebc60fd1bb4b6eda300155faaa2e6492d8145b3c6084b1e8ef5ec7d4e0ff694beb328d2e5ed755c9d04b4
2022-07-22 13:11:40 +00:00
Erik Arvstedt
84b69dfb46
versioning: improve description wording 2022-07-17 12:46:01 +02:00
Erik Arvstedt
7d7f2df006
fulcrum: add module 2022-07-09 11:07:09 +02:00
Erik Arvstedt
f946a7cd9b
examples: use mkDefault for setting system.stateVersion
This makes it easier for users to override the default.
2022-07-08 15:10:03 +02:00
Jonas Nick
739fa36785
Merge fort-nix/nix-bitcoin#508: More NixOS 22.05 fixes
7261813051 examples/configuration.nix: use `system.stateVersion` comment from NixOS 22.05 (Erik Arvstedt)
2ae2eea54e run-tests: fix command `debug` on NixOS 22.05 (Erik Arvstedt)
a8255d61d7 lib/make-container: update required extra-container version (Erik Arvstedt)
f02f27cbca lib/make-test: fix `system.stateVersion` warning (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 7261813051

Tree-SHA512: ae6d15092666187dfb9eca6a307ee2533446e49265390315b74d00b848b072339e522308ed88751d09631cc064c0f7fd34084add38ca52c130153a4ebc527549
2022-07-05 10:13:10 +00:00
Erik Arvstedt
7261813051
examples/configuration.nix: use system.stateVersion comment from NixOS 22.05 2022-07-05 10:13:55 +02:00
Erik Arvstedt
3f3f31c32d
examples/krops: fix nixpkgs symlink sync error on macOS/BSD 2022-07-04 23:42:09 +02:00
Erik Arvstedt
fe68ee650b
fix containers on nixos-22.05 2022-06-28 00:09:26 +02:00
Erik Arvstedt
15e7b32c2d
fix VMs on nixos-22.05 2022-06-28 00:09:26 +02:00
Erik Arvstedt
3102c99275
configuration.nix: update system.stateVersion 2022-06-28 00:09:25 +02:00
Erik Arvstedt
c8d5cb2405
examples: improve Flakes-based VM
- Show login message
- Poweroff on shell exit
- Move to top of examples/README
2022-06-02 14:06:54 +02:00
Erik Arvstedt
1e94e891b2
flake: move VM to separate file
This simplifies the flake.
2022-06-01 22:12:50 +02:00
Erik Arvstedt
7233b054d9
flake: use new output format
The previous format is deprecated.
2022-06-01 22:12:47 +02:00
Jonas Nick
ebaa9a3f2e
Merge fort-nix/nix-bitcoin#484: Update RTL
3755b3ebea rtl: add option `extraConfig` for nodes (Erik Arvstedt)
ff228a604d rtl: change `nodes` options (Erik Arvstedt)
beae9f8df7 clightning-rest: 0.7.0 -> 0.7.2 (Erik Arvstedt)
4c2d908a38 rtl: 0.12.2-beta -> 0.12.3-beta (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK 3755b3ebea

Tree-SHA512: 21b413473792802a49694427dd488d7ba0575bb79297b8cd3d3e09707f0389fa4a65ed18eea11af167e1f42154f43685a7afc0829b769dea4b8d64007dcd7be5
2022-05-25 19:48:42 +00:00
Erik Arvstedt
e2721a9039
examples/configuration.nix: update system.stateVersion 2022-05-20 13:28:42 +02:00
Erik Arvstedt
ff228a604d
rtl: change nodes options
- Move option `rtl.nodes.{lnd,clightning}` -> `rtl.nodes.{lnd,clightning}.enable`
  This is required by the next commit.

- Move option `rtl.loop` -> `rtl.nodes.lnd.loop`

- Only enable loop when `nodes.lnd` is enabled
2022-05-15 21:25:32 +02:00
Erik Arvstedt
4b800605e0
add release branch
Use this as the default in the example flake.
2022-05-06 16:49:31 +02:00
Erik Arvstedt
e2fee4bf1a
lnd-rest-onion-service.nix: move to lndconnect-onion.nix, add clightning support
Option `services.lnd.restOnionService.package` has been removed.
There's not much use in overriding the [lndconnect pkg](https://github.com/LN-Zap/lndconnect).
2022-05-06 16:26:40 +02:00
Erik Arvstedt
7de56b019f
nbxplorer: use postgresql
The former DBTrie backend has been deprecated.
2022-05-06 13:35:27 +00:00
nixbitcoin
b8524720a5
lnd: point out SCB functionality more clearly 2022-02-14 14:04:11 +00:00
Erik Arvstedt
d959d5b558
secure-node: don't set nix-bitcoin.secretsDir
This simplifies the docs and the secure-node module.

This change doesn't affect users that deploy via krops.
2022-02-05 21:35:50 +01:00
Erik Arvstedt
7b0c3d48c9
docs/services.md: link to clightning plugin list
The old list was incomplete.

Also update configuration.nix.
2022-02-05 21:34:10 +01:00
Erik Arvstedt
7402212263
examples/configuration.nix: disable passwordAuthentication
This is a sensible default.

Also clarify the pubkey setup.
2022-02-05 21:34:09 +01:00
Erik Arvstedt
e093bb64d9
examples/configuration.nix: fix links to docs/services.md 2022-02-05 21:34:09 +01:00
Erik Arvstedt
6be3fb3e77
flake: provide a single NixOS module
Instead of providing two NixOS modules (one for using system pkgs,
one for using locked pkgs), provide a single module with option
`useVersionLockedPkgs`.

This fixes that all nix-bitcoin options are displayed twice
on search.nixos.org:
https://search.nixos.org/flakes?type=options&query=clightning
2021-12-27 16:59:14 +01:00
Erik Arvstedt
bd275d3a9a
minor improvements
- README:
  - Add RTL

- examples/configuration.nix:
  - Fix comment

- btcpayserver.nix:
  - Use nbLib.addressWithPort
  - Embed optionalString like the other optionalStrings

- clboss.nix:
  - Improve description

- clightning.nix:
  - Option `extraConfig`: Add example, improve description.
  - Disable `log-timestamps`. Timestamps are already logged via journald.
  - Simplify `preStart` script

- electrs.nix:
  - Use `port` description wording like in other services.
2021-11-28 21:18:40 +01:00
Erik Arvstedt
8aa28da110
remove recurring-donations module
This module has failed to evaluate for quite some time.
We might bring it back someday with bolt12 and LNURL support.
2021-11-28 21:18:39 +01:00
nixbitcoin
f569227410
rtl: add module 2021-11-09 14:13:42 +00:00
Jonas Nick
bac8518e7c
secure-node: stop pruning liquidd
There is no security reason why pruning should be enabled and therefore it
surprises users. Turning on pruning in the first place was simply a mistake.
2021-10-31 14:37:56 +00:00
Erik Arvstedt
aada35fc7b
minor improvements
- README: add matrix room

- examples/configuration.nix: explain why bitcoind is enabled by default

- btcpayserver: group lnd service settings

- clightning:
  Use public onion port only when the onion service is public

  This allows users to enable the onion service while announcing a
  non-onion public address.

- netns-isolation: move `readOnly` attr to the top

- tests: use mkDefault to allow for easier overriding

- tests/btcpayserver: test web server response
2021-10-30 15:34:48 +02:00
Erik Arvstedt
75b89f3957
electrs: adapt to version 0.9.0
- `waitfornewblock` was previously not included in the public RPC
  whitelist because it's reserved for testing and marked as hidden
  in bitcoind.

- electrs changed its verbosity settings. `-vv` is now the best choice
  for normal usage.

- bitcoind option `dataDirReadableByGroup` is now unused.
  Because it can be valuable for other use cases and implementing
  it is intricate, we're keeping it for now.

- test: keep `nc` connection open because otherwise the electrs
  RPC server would now close the connection before sending a response.
2021-10-06 15:34:24 +02:00
Erik Arvstedt
3c6a664b7b
examples/configuration: show how to enable sudo/doas for operator
This was brought up by a user on IRC.
2021-10-04 00:33:27 +02:00
Jonas Nick
e86d1ff0ff
Merge fort-nix/nix-bitcoin#399: examples: Fix shell on non-Linux systems
46af0b1a8d examples: fix shell on non-Linux systems (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 46af0b1a8d

Tree-SHA512: bc3c24c75b2d26a30f9f4f88700da8a78d8276802b47ddaf3d52097ba6ed16a7b7ca662085e2775a2cd1654b07c1759c36918ee0ab05eb90fbfeac3265576510
2021-09-27 09:14:44 +00:00
Jonas Nick
a4ac735cd3
Merge fort-nix/nix-bitcoin#396: examples: add importable-configuration.nix
2a16db6919 readme: add 'Get started' section (Erik Arvstedt)
d713e7b15c examples: add importable-configuration.nix (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 2a16db6919

Tree-SHA512: 76338cbd852503df2fa316d4fd6833ad423f166aed4ac556c6917bdf6b39610f8a62323e6bd7c9d191238bb6f6dce9e918b0b303dc80a6534497eb89cb7ec344
2021-09-27 09:11:21 +00:00
Erik Arvstedt
46af0b1a8d
examples: fix shell on non-Linux systems
extra-container is not supported on these systems.

Also mention that VM examples require Linux.
2021-09-26 23:58:46 +02:00
Erik Arvstedt
d713e7b15c
examples: add importable-configuration.nix
This replaces minimal-configuration.nix.
importable-configuration.nix can be directly added to an existing
NixOS configuration. This makes it easy for users to get started quickly.
2021-09-26 22:34:39 +02:00
nixbitcoin
c483f1694d
examples: correct localBackups scp command 2021-09-24 11:51:33 +00:00
Erik Arvstedt
1f8f2b2139
examples/shell.nix: Add shell version variable
This simplifies future shell upgrades.
2021-09-15 12:22:10 +02:00
Erik Arvstedt
77af2e4538
makeShell: improve update-nix-bitcoin
- Don't overwrite `nix-bitcoin-release.nix` on errors
- Show a message to indicate whether `nix-bitcoin-release.nix` was
  updated
- Don't start a shell when called noninteractively

Also, update `usage.md` and reformat `shell.nix`.
2021-09-14 19:56:35 +02:00