Commit Graph

21 Commits

Author SHA1 Message Date
Erik Arvstedt
142cbcfb37
flake: remove 32-bit systems 2022-12-18 20:01:52 +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
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
47a09ec214
flake: expose supportedSystems 2022-11-03 23:08:05 +01:00
Erik Arvstedt
d428755399
flake: rename input nixpkgsUnstable -> nixpkgs-unstable
This follows common flake naming conventions.
2022-11-03 23:08:05 +01:00
Erik Arvstedt
e63dafe0f7
pkgs: add fetch-node-modules 2022-08-21 19:11:51 +02:00
Erik Arvstedt
fe2df830a2
flake: add system armv7l-linux
There are some ARMv7 single board computers that are capable of
running a bitcoin node (see https://nixos.wiki/wiki/NixOS_on_ARM).
2022-07-17 22:17:47 +02:00
Erik Arvstedt
9d20837b90
flake: remove rec 2022-07-15 11:42:13 +02: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
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
Erik Arvstedt
6f8b4d9ebe
flake: optimize nixpkgs importing
`nixpkgs.legacyPackages.${system}` allows reusing a single pkgs instance
that is shared among all flakes with the same `nixpkgs` input.
This is relevant when a user overrides the `nixpkgs` input of our flake
or exports our `nixpkgs` input to other flakes.
`import nixpkgs` would create a new pkgs instance instead.
2022-02-03 20:47:25 +01:00
Erik Arvstedt
16e2d4c8b7
flake: remove unneeded indirection in legacyPackages
Example: The nix-bitcoin electrs pkg can now be reached via flake attr
.#modulesPkgs.electrs
instead of
.#nbPkgs.modulesPkgs.electrs
2022-02-03 20:47:24 +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
d69524143b
flake: remove nonstandard top-level flake attrs
Silences warnings in `nix flake check`.

- Define `mkNbPkgs` under attr `lib`.
  `lib` still triggers a warning, but it is expected to be a standard
  flake attr in a future Nix release.

- Define `nbPkgs` under attr `legacyPackages`.
  This also has the advantage to make its contents more easily
  accessible via the nix CLI. Example:
  nix eval nix-bitcoin#nbPkgs.modulesPkgs.clightning.version
2021-12-27 16:59:14 +01:00
Erik Arvstedt
5e59c784ed
flake: remove internal pkg netns-exec from packages 2021-12-12 16:21:12 +01:00
nixbitcoin
16f5aa0561
update to NixOS 21.11 2021-12-08 12:38:00 +00: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
Erik Arvstedt
b9301ce0d9
emergency fix: lnd: 0.13.1-beta -> 0.13.3-beta
Fixes CVE-2021-41593.
Temporarily switch to nixpkgs/master.
2021-10-06 15:34:24 +02:00
Erik Arvstedt
24fd1e9bdc
improve examples/shell.nix
The user's local node configuration directory usually contains a copy of
examples/shell.nix.

1. Move the shell implementation from shell.nix to nix-bitcoin/helper/makeShell.nix
   Because the shell is no longer defined locally in the user's config
   directory, we can now ship new shell features via nix-bitcoin updates.

2. Simplify examples/nix-bitcoin-release.nix
   nix-bitcoin-release.nix, as generated via `fetch-release`, now
   contains a simple fetchTarball statement which can be directly imported.
   This allows us to get rid of the extra `nix-bitcoin-unpacked` derivation
   which adds a dependency on the user's local nixpkgs.

   To keep `fetch-release` as simple as possible for easy auditing, we just
   fetch and verify a `nar-hash.txt` file that is now uploaded
   via `push-release.sh`.

A migration guide for updating the user's local `shell.nix` is
automatically printed when the user starts a new shell after updating
nix-bitcoin.
This is achieved by throwing an error in `generate-secrets`, which is called
on shell startup.

This commit is required to deploy the new extensible `generate-secrets`
mechanism introduced in the next commit.
2021-09-12 11:29:54 +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