Commit Graph

274 Commits

Author SHA1 Message Date
Erik Arvstedt
5eb01498d5
tests: add comment 2022-08-05 13:48:53 +00:00
Erik Arvstedt
952cd3773f
run-tests: support tests with multiple VMs in run 2022-08-05 13:48:36 +00:00
nixbitcoin
17507835fc
clightning: native database replication
Don't put `clightning.replication` options in
`examples/configuration.nix` until it is more "battle-tested."
2022-08-05 13:48:24 +00:00
Erik Arvstedt
9c5dbeaa83
test/nixos-search: fix wrong flake being tested
Now the test targets the main nix-bitcoin flake instead of the
nixos-search flake.

Also remove `NIX_PATH`, which is no longer required.
2022-07-22 17:41:31 +02:00
Jonas Nick
7ec248dba1
Merge fort-nix/nix-bitcoin#521: update nixpkgs
1276c40aaa update nixpkgs (Jonas Nick)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 1276c40aaa

Tree-SHA512: 6ea60b1a0e9259cd77742722b5e803a25f5889b09fc989c64c750692f68c83f78784ffa4b72618e2506330a650bad40a6d7b5eb9e390a6d69b0e7fa4198cf79a
2022-07-22 14:59:11 +00:00
Jonas Nick
1276c40aaa
update nixpkgs
btcpayserver: 1.5.4 -> 1.6.1
nbxplorer: 2.3.26 -> 2.3.28
2022-07-22 13:15:25 +00: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
8dc4858872
bitcoind: remove banlist loader
Gmaxwell's banlist (https://people.xiph.org/~greg/banlist.cli.txt) is
no longer maintained and hasn't been updated since 2 years.
2022-07-15 14:45:37 +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
Erik Arvstedt
c853f380d4
lightning-loop: add certificate options extraIPs and extraDomains
This is useful for non-local access to the lightning-loop REST server.
2022-07-07 16:09:26 +02:00
Erik Arvstedt
edfbe700e7
lnd: add certificate options extraIPs and extraDomains
This is useful for non-local access to the lnd REST server.
2022-07-07 16:09:26 +02:00
Erik Arvstedt
79994d0bd2
tests: increase postgresql startup timeout
Required for Cirrus CI.
2022-07-07 11:43:21 +02:00
Erik Arvstedt
2ae2eea54e
run-tests: fix command debug on NixOS 22.05 2022-07-05 10:13:55 +02:00
Erik Arvstedt
a8255d61d7
lib/make-container: update required extra-container version 2022-07-05 10:13:54 +02:00
Erik Arvstedt
f02f27cbca
lib/make-test: fix system.stateVersion warning 2022-07-05 10:13:54 +02:00
Erik Arvstedt
4579b44781
update nixpkgs
clightning: 0.11.1 -> 0.11.2
lnd: 0.14.3-beta -> 0.15.0-beta
2022-07-03 02:09:33 +02:00
Jonas Nick
c7eab98a31
tests: fix deprecation warning 2022-06-27 21:15:38 +00:00
Jonas Nick
805eb26d12
update nixpkgs (stable: 21.11 -> 22.05)
extra-container: 0.8 -> 0.10
btcpayserver: 1.5.3 -> 1.5.4
lightning-loop: 0.18.0-beta -> 0.19.1-beta
2022-06-27 21:15:34 +00:00
Jonas Nick
043ef53cb9
Merge fort-nix/nix-bitcoin#489: Update nixpkgs & joinmarket: 0.9.5 -> 0.9.6
cb295d1a16 joinmarket: 0.9.5 -> 0.9.6 (nixbitcoin)
568d728e5c joinmarket: put python-packages in alphabetical order (nixbitcoin)
a3ff1351d9 update nixpkgs (Jonas Nick)
636d508b50 spark-wallet: use nodejs 14 instead of 12 since latter is EOL (Jonas Nick)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK cb295d1a16

Tree-SHA512: ca124de4d393c3828454599e4d3d3357560a6ae902c569b3edabf395cd6f5d50d8904db9f078f02b70cd0b67d013a263d238e9bc36ba34bc1bb7d9d9fd02a7e9
2022-06-04 07:56:24 +00:00
Jonas Nick
a3ff1351d9
update nixpkgs
btcpayserver: 1.5.1 -> 1.5.3
hwi: 2.1.0 -> 2.1.1
lndconnect: 0.2.0 -> 0.2.1
nbxplorer: 2.3.20 -> 2.3.26
2022-06-01 12:37:32 +00:00
Erik Arvstedt
f9315db52c
clightning/feeadjuster: add test 2022-05-27 11:22:00 +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
84fe731c94
treewide: curl: exit with error status on HTTP errors
This makes scripts fail early on request errors.
Previously, curl exited with status 0 when enountering HTTP error status
codes.
`-fsS` equals `--fail --silent --show-error`.
2022-05-17 13:19:38 +02:00
Jonas Nick
b2ac602b46
update nixpkgs
clightning: 0.11.0.1 -> 0.11.1
2022-05-16 21:03:10 +00:00
Erik Arvstedt
3755b3ebea
rtl: add option extraConfig for nodes
Also define rtl config as a Nix attrset that is converted to JSON
2022-05-15 21:25:32 +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
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
acf5fe69ad
add standalone clightning-rest service
- Rename `services.rtl.cl-rest` to `services.clightning-rest`.
  `clightning-rest` is generally useful for connecting external REST clients
  to clightning.

- Add a dedicated network namespace in netns-isolation.

- Add nodeinfo entry.

- Add datadir (which contains REST auth data) to backups.
2022-05-06 16:26:40 +02:00
Jonas Nick
6bdf0ac3fb
update nixpkgs{,-unstable}
This commit does not pass the tests. Fixup is in the next commit.

bitcoin: 22.0 -> 23.0
bitcoind: 22.0 -> 23.0
btcpayserver: 1.4.7 -> 1.5.1
clightning: 0.10.2 -> 0.11.0.1
electrs: 0.9.6 -> 0.9.7
hwi: 2.0.2 -> 2.1.0
lightning-loop: 0.17.0-beta -> 0.18.0-beta
lnd: 0.14.2-beta -> 0.14.3-beta
nbxplorer: 2.2.20 -> 2.3.20
2022-05-06 13:35:32 +00:00
Erik Arvstedt
408486ac9c
tests: update nbxplorer 2022-05-06 13:35:28 +00:00
Erik Arvstedt
aa21fb454e
tests: disable btcpayserver.lbtc for regtest
Previously, in case of btcpayserver.lbtc on regtest, nbxplorer just
printed a log error while trying to generate liquidd regtest blocks.
Now nbxplorer exits with an error, so disable lbtc.
2022-05-06 13:35:27 +00:00
Jonas Nick
d394a079a8
update nixpkgs{,-unstable} 2022-04-04 17:17:31 +00:00
nixbitcoin
4f74690292
joinmarket: 0.9.4 -> 0.9.5
Notes
- We can no longer test for `unknown error in JSON-RPC`. `jm-ob-watcher`
  now simply outputs `Starting ob-watcher`. Tested working on
  https://nixbitcoin.org/orderbook.
- Removed Agora IRC server since it is offline semi-permanently. Should
  probably also be removed upstream.
- Includes patch for
  https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1193
2022-03-30 11:25:45 +00:00
Jonas Nick
16daaaf79f
update nixpkgs{,-unstable}
btcpayserver: 1.4.4 -> 1.4.7
elementsd: 0.21.0.1 -> 0.21.0.2
lightning-loop: 0.16.0-beta -> 0.17.0-beta
2022-03-05 21:49:07 +00:00
Jonas Nick
2618af74e4
Merge fort-nix/nix-bitcoin#445: clightning-plugins: add commando plugin
ee4cdb0586 pyln-proto: relax pycparser constraint (William Casarin)
2d6c4e829e readme: fix monitor c-lightning plugin link (William Casarin)
0bede274a8 clightning-plugins/commando: add module (Erik Arvstedt)
380ec3bb78 clightning-plugins: add commando (William Casarin)
80312ba9d7 python-packages/sha256: init at 0.1 (William Casarin)
71eccb73d6 python-packages/runes: init at 0.4.0 (William Casarin)
570e271695 clightning-plugins: bump to latest git (William Casarin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK ee4cdb0586

Tree-SHA512: 2db97ee758f061ce72f8e049299c453cc4e9947d9af55c68745aa15bcd9529cb47defb52366ca216249441fb8e113c3b3b048a5381f41fd1ef80e677dae0fe37
2022-02-27 18:38:18 +00:00
Erik Arvstedt
0bede274a8 clightning-plugins/commando: add module 2022-02-24 08:31:54 -08:00
Jonas Nick
282454f16e
update nixpkgs{,-unstable}
btcpayserver: 1.3.7 -> 1.4.4
electrs: 0.9.4 -> 0.9.5
lnd: 0.14.1-beta -> 0.14.2-beta
nbxplorer: 2.2.18 -> 2.2.20
2022-02-11 08:42:51 +00:00
Martin Milata
dac62375c1 update nixpkgs{-unstable} 2022-01-27 14:56:41 +01:00
Jonas Nick
5b7bc2d6ff
update nixpkgs{-unstable}
electrs: 0.9.3 -> 0.9.4
2022-01-20 21:59:13 +00:00
Erik Arvstedt
98bc0917d7
run-tests: fix vm cmd
Previously, qemu failed with error
`restrict=on : Parameter 'restrict' expects 'on' or 'off'`
due to the trailing space after `on`.
2022-01-04 22:30:35 +01:00
Jonas Nick
1f45f7351e
update nixpkgs{,-unstable}
btcpayserver: 1.3.6 -> 1.3.7
elementsd: 0.21.0 -> 0.21.0.1
lightning-loop: 0.15.0-beta -> 0.16.0-beta
lightning-pool: 0.5.1-alpha -> 0.5.3-alpha
2022-01-01 20:15:10 +00:00
Erik Arvstedt
f13ffe0146
run-tests: make nixosSearch compatible with --copy-src 2021-12-15 10:58:04 +01:00
Erik Arvstedt
1ef40ac230
ci: add flake test
- Check flake
- Check nixos-search doc generation
2021-12-12 16:21:12 +01:00
Erik Arvstedt
26a53f0d59
ci: simplify test
Remove obsolete features that were required for pkgsUnstable.
2021-12-12 16:21:11 +01:00
Erik Arvstedt
0fd3be5343
move ci/ to test/ 2021-12-12 16:21:11 +01:00
Erik Arvstedt
eaf98f92db
test: add test nixosSearch
This checks that creating module docs for search.nixos.org succceeds.
Errors can happen when complex `default` values can't be evaluated
or on malformed Docbook XML in descriptions.
2021-12-12 16:21:02 +01:00
Erik Arvstedt
77d8c00c53
run-tests.sh: extract checkFlakeSupport
Required by the following commit.
2021-12-12 16:20:40 +01:00
Erik Arvstedt
96df81a4d0
run-tests: move flake next to other tests 2021-12-12 16:20:40 +01:00
Erik Arvstedt
8f641756ce
tests: add TODO-EXTERNAL 2021-12-10 12:15:36 +00:00
Erik Arvstedt
b2f7a80f9f
tests: add compatibility with 21.11
Adapt to the new test driver and systemd versions.
2021-12-10 12:15:20 +00:00
Jonas Nick
747019a9e9
Merge fort-nix/nix-bitcoin#425: Misc. improvements
def64a73b8 treewide: use TODO-EXTERNAL (Erik Arvstedt)
6f37bef2a3 netns-isolation: simplify firewall setup (Erik Arvstedt)
f52059ce3c docs: add doc 'Configuration and maintenance' (Erik Arvstedt)
94aee8174d usage.md: add section `Managing services` (Erik Arvstedt)
8cc7b83da1 usage.md: convert to '#' heading syntax (Erik Arvstedt)
91fbcfcc77 faq.md: reformat (Erik Arvstedt)
9e4f4d6b0f bitcoind: add option `txindex` (Erik Arvstedt)
10a744a598 rtl: add option `extraCurrency` (Erik Arvstedt)
62a2602e78 electrs: use dataDir for storing extra config (Erik Arvstedt)
9bda7305fd services: add `tor.*` options (Erik Arvstedt)
ff24e73ad7 onion-addresses: fix files not being copied (Erik Arvstedt)
c6fe017aeb netns-isolation: avoid creating service files for disabled services (Erik Arvstedt)
017e08ca10 btcpayserver: move nbxplorer options to bottom (Erik Arvstedt)
e1d869d76c modules.nix: move rtl to fix topological sorting (Erik Arvstedt)
e44cd7ecdc rtl: improve descriptions (Erik Arvstedt)
bd275d3a9a minor improvements (Erik Arvstedt)
8aa28da110 remove `recurring-donations` module (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK def64a73b8
  jonasnick:
    ACK def64a73b8

Tree-SHA512: 13acd2a3dd73c07f9c31874c8e961f12f39accb48847cbad08479b9a8154b79a6f186819272072dfb5c4768264b81f6e058e9afa57a729db2096784e48352dfd
2021-11-29 18:05:19 +00:00
Erik Arvstedt
10a744a598
rtl: add option extraCurrency 2021-11-29 13:22:44 +01:00
Erik Arvstedt
62a2602e78
electrs: use dataDir for storing extra config
This is simpler and more memory-efficient.
We've also changed other services to use this appraoch.

Also remove unneded `wait_for_unit` in the electrs regtest test.
2021-11-29 13:22:44 +01:00
Jonas Nick
daeea4012e
tests: remove pkgsUnstable
The latest nixpkgs-unstable update would require node-based packages to
distinguish between stable and unstable when building. Instead of dealing with
that complexity, we will only guarantee compatability of our packages with
stable.
2021-11-28 19:16:21 +00:00
nixbitcoin
41c4dd041e
test: add rtl & cl-rest 2021-11-09 14:13:49 +00:00
Erik Arvstedt
b3e868d0af
tests/regtest: disable incompatible validatepegin for liquidd
Otherwise liquidd startup fails. This bug was not covered by our tests,
because we're not combining `regtest` with `secure-node`.
But nixbitcoin.org does, which should suffice for now.
2021-11-02 17:40:43 +01:00
Erik Arvstedt
083e141e3e
tests/btcpayserver: test bitcoind P2P connection in regtest
nbxplorer requires at least 100 blocks (coinbase maturity) in regtest.
2021-11-02 17:40:43 +01:00
Erik Arvstedt
82c92df162
tests/regtest: fix restarting bitcoind
Previously, the test wallet was not loaded after restarting bitcoind and
generating blocks failed.
2021-11-02 17:40:43 +01: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
8c3a88b2e8
update nixpkgs-unstable
Switch back from nixpkgs master to unstable.

Pkg updates:
btcpayserver: 1.2.3 -> 1.2.4
electrs: 0.9.0 -> 0.9.1
elementsd: 0.18.1.12 -> 0.21.0
lightning-pool: 0.5.0-alpha -> 0.5.1-alpha
nbxplorer: 2.2.5 -> 2.2.11

- liquidd:
  add `onionPort` like in bitcoind

- tests/electrs:
  remove KillSignal workaround
2021-10-29 17:59:25 +02:00
nixbitcoin
d5ce1c43a8
test: make joinmarket work with regtest 2021-10-27 16:08:28 +02:00
nixbitcoin
a10aa21c69
joinmarket: 0.9.2 -> 0.9.3 2021-10-27 16:02:59 +02:00
Erik Arvstedt
265fc1911d
extra-container: pin to nixpkgs-unstable
extra-container is now part of nixpkgs.
2021-10-06 15:34:24 +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
0853dedc43
tests/regtest: don't fail when restarting bitcoind 2021-10-06 11:27:52 +02:00
Erik Arvstedt
27905e2c3a
tests: disable restarting joinmarket-ob-watcher
This removes the repeated failure messages from the test log.
2021-10-05 16:45:00 +02:00
Erik Arvstedt
e61c743644
test: add option extraTestScript
This allows extending tests.py.
2021-10-04 00:33:27 +02:00
Erik Arvstedt
32ce9d0ff4
run-tests: fix 'eval' command for newer versions of nix
There's no common `nix` command argument syntax for eval'ing a nix
expression that supports both older and newer (flake support) versions of nix.
So fall back to nix-instantiate.
2021-09-04 08:17:38 +02:00
Erik Arvstedt
926f1febb7
make-container: update extra-container version
Keep this file in sync with the latest extra-container update.
2021-09-04 08:17:38 +02:00
nixbitcoin
5c14453389
joinmarket-ob-watcher: don't assert running, assert rpc failure
joinmarket-ob-watcher now makes extensive use of bitcoind because of
JoinMarket's new fidelity bond functionality. Therefore it fails on
non-synced nodes, as those in the test suite. We now test that the
service fails with the correct error, rather than asserting that it is
running.
2021-08-30 13:37:04 +02:00
Erik Arvstedt
f7c2133250
add flake support
This change is fully backwards compatible.

We continue to use the standard non-flake evaluation mode in our
examples and internal tooling until the flakes design has stabilized.

'clightning-plugins = pkgs.recurseIntoAttrs' in pkgs/default.nix is
needed by flake-utils.lib.flattenTree in flake.nix.
It transforms the packages in `clightning-plugins` to top-level packages
named like `clightning-plugins/summary`. (The flake attr `packages`
must be a non-nested attrset of derivations.)
2021-08-26 12:45:10 +02:00
Erik Arvstedt
b0c66c41e1
tests: add container-minimal example 2021-08-15 22:42:03 +02:00
Erik Arvstedt
6de9aba854
run-tests: quote scriptDir
scriptDir may contain spaces.
2021-08-15 11:29:35 +02:00
Erik Arvstedt
7c876664b1
netns test: update matching of 'capsh' output
The output now contains multiple lines.
2021-08-14 10:46:42 +02:00
Erik Arvstedt
308a11f22b
tests: avoid postgresql timeout failures on CI nodes 2021-08-14 10:46:42 +02:00
Erik Arvstedt
01804e6dfb
tests: improve test script formatting
Remove annyoing spacing constraints enforced by the previous 'black' linter.
2021-08-14 10:46:42 +02:00
Erik Arvstedt
1be924529d
tests: adapt to new linter
The Python test driver now uses 'pyflakes'.
Remove hacks that were needed for the 'black' linter.
2021-08-14 10:46:42 +02:00
Erik Arvstedt
c1c663d0a9
tests: fix formatting 2021-08-14 10:46:42 +02:00
Erik Arvstedt
35fe939cf8
security: update /proc restriction mechanism
NixOS option `security.hideProcessInformation` for globally restricting
access to /proc has been removed.
Use per-service restrictions via 'ProtectProc' instead.

Rename
`nix-bitcoin.security.hideProcessInformation` to
`nix-bitcoin.security.dbusHideProcessInformation`
because this option now only implements the dbus restriction.
2021-08-14 10:46:41 +02:00
Erik Arvstedt
0ef66c920b
treewide: use services.getty option
services.mingetty is equivalent but deprecated.
2021-08-14 10:46:40 +02:00
nixbitcoin
54810ce1bf
btcpayserver: add L-BTC support 2021-08-10 10:04:54 +00:00
nixbitcoin
b24c14ec61
liquidd: make regtest capable 2021-08-10 10:04:22 +00:00
Erik Arvstedt
ed364f5932
tests: speed up stopping of clightning with clboss
This speeds up the 'backups' test by 90 s.
2021-07-29 20:27:34 +02:00
Pavol Rusnak
2f4d7b866c
elementsd: replace local version with nixpkgs 2021-07-16 23:32:58 +02:00
Jonas Nick
676a4beb81
Merge fort-nix/nix-bitcoin#359: charge-lnd: add module
b666bb2903 charge-lnd: add module (Martin Milata)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK b666bb2903

Tree-SHA512: c5e1edeefbd68ec4ba0e12c57922fb21ae3d1b3d54e403087e5bb7f6285db0a011404125c516bd7739741609d21fef6e7d86ad613c364aca6010652118faffff
2021-07-15 22:15:28 +00:00
Martin Milata
b666bb2903 charge-lnd: add module 2021-07-12 17:36:31 +02:00
nixbitcoin
ffbbdab999
lightning-loop & lightning-pool: replace local versions with nixpkgs 2021-07-12 11:20:32 +00:00
Erik Arvstedt
7ae0a38701
electrs: replace local version with nixpkgs 2021-05-04 11:31:35 +00:00
nixbitcoin
a71f69cb3a
hwi: replace local version with upstream 2021-04-23 11:17:18 +00:00
Jonas Nick
447606efaf
tests: add clboss 2021-04-13 14:12:39 +00:00
Jonas Nick
9e7d9ee475
Merge #348: run-tests: add 'vm' command
3cce822c64 run-tests: add 'vm' command (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK 3cce822c64

Tree-SHA512: 1b7cdc0bc3b73634fdc6abd6817417fd49853be076cf71cc54487e5db9e97e67832eef5ecbb8e899e30a91a60ff333e022e51cc664df7364417240f05096eb16
2021-04-02 12:57:44 +00:00
nixbitcoin
3b938a909f
add hardened-extended preset 2021-04-02 10:59:09 +00:00
Erik Arvstedt
3cce822c64
run-tests: add 'vm' command 2021-03-26 23:23:22 +01:00
Erik Arvstedt
6ba5880b2c
test.py: improve composability of test 'banlist-and-restart'
The test now works if not all services previously used in the
`systemctl restart` command are available.
2021-03-22 14:39:31 +01:00
Erik Arvstedt
44439e2a81
tests: optimize building multiple tests at once
The result of `import tests.nix {}` is now an attrset of tests.
This makes it easier and more efficient to evaluate or build multiple
tests in one call to `nix build`.

Simplify tests.nix by removing the large module args scope in favor of
self-contained scenario module definitions.

Add CPU core and memory size defaults to the test configuration to
enable building tests without `run-tests.sh`.

Add the following top-level args to tests.nix:
- `extraScenarios` to provide a nix-level way to define extra scenarios.
- `pkgs` to allow building tests with custom pkgs or systems.
2021-03-22 14:35:29 +01:00
Erik Arvstedt
9ca52af523
tests: improve make-test-vm.nix
1. fixedTest: Remove some unneeded layers of function calls.

2. Don't add a modified version of `black` to the global pkgs set.
   Tests should not affect the pkgs of the tested system modules.
   Fix the driver build script instead by adding an extra arg to the
   call to `black`.
2021-03-22 14:35:29 +01:00
Erik Arvstedt
e8b47f099c
examples: add deploy-krops.sh 2021-03-15 19:02:58 +01:00
Erik Arvstedt
03db1a61b1
lnd, joinmarket: don't write to secrets dir
Keeping the secrets dir read-only is more simple and robust.

- lnd seed mnemonic creation and joinmarket wallet creation can be
  run as the regular service user instead of root.

- It is easier to switch to a third-party secrets deployment
  method in the future.

Don't create a seed mnemonic for lnd when a wallet exists.
This avoids creating unused mnemonics and helps simplifying
the migration command in `versioning.nix`.
2021-03-15 18:50:15 +01:00
Erik Arvstedt
b701cb5603
secrets: add option 'generateSecrets'
Move this feature from a module preset to a regular option, so that it's
easily discoverable and accessible.

Simplify the implementation of `generateSecrets` by adding it to the
existing `setup-secrets` service script.

Also rename option setup-secrets -> setupSecrets.
2021-03-15 12:42:52 +00:00