Commit Graph

744 Commits

Author SHA1 Message Date
William Casarin e3c54aa64e
clightning: add currencyrate plugin
Add the currencyrate plugin. This is used by other plugins to fetch
currency rates. This can be used for setting fiat amounts in bolt12
invoices.

Signed-off-by: William Casarin <jb55@jb55.com>
2022-07-26 14:47:40 +02:00
Erik Arvstedt 42bf0422e0
operator: fix syntax error in description
Fix error `Invalid XML` when running flake-info (nixos-search) .
2022-07-22 17:17:11 +02:00
Jonas Nick adef50a5c3
Merge fort-nix/nix-bitcoin#520: secrets: fix sorting in `setup-secrets`
0ba6c63670 secrets: fix sorting in `setup-secrets` (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    utACK 0ba6c63670

Tree-SHA512: f9bea9c3d73879c6450315d6c3f1920b1599b5a5875004cb6d6cb94d368362d79a0a23d7d2427711d548004eaac482145e7e732f531879dd049b14678f37a048
2022-07-22 13:36:12 +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 0ba6c63670
secrets: fix sorting in `setup-secrets`
Now the bash globbing sort order equals the nix sort order
(order of `processedFiles`)
Previously, `comm` could fail with error `unsorted` on
specific secrets names.
2022-07-22 14:57:06 +02:00
Jonas Nick 7a40c39d5c
Merge fort-nix/nix-bitcoin#512: Remove bitcoind banlist
8dc4858872 bitcoind: remove banlist loader (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK 8dc4858872
  jonasnick:
    ACK 8dc4858872

Tree-SHA512: a3002863b1bcf97f2553d977006bffe0d0554df4d27f6a50898e9dc3a200a5a95878ba2038d5a32d8c3e54ced7a1bf6a8735e954b496fecb20af42637844329e
2022-07-17 19:57:50 +00:00
Jonas Nick d3664b09b4
Merge fort-nix/nix-bitcoin#511: Minor improvements
84b69dfb46 versioning: improve description wording (Erik Arvstedt)
9d20837b90 flake: remove `rec` (Erik Arvstedt)
c82e0ee294 clightning/plugins: format plugin defs, order alphabetically (Erik Arvstedt)
9ac3d93b27 improve comments, descriptions (Erik Arvstedt)
97b1a1d353 operator: improve descriptions (Erik Arvstedt)
27dd31ead5 clightning/feeadjuster: fix typo (Erik Arvstedt)
df5abd5eab lnd: move `wallet-unlock-password-file` setting to config (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 84b69dfb46

Tree-SHA512: e326ea37c4c4e766a634e90a069a441933dfac5a91e85c136e49dd17c16ee6e5e3fbfb15399f97321e412ab1624f1040116e2516e2635188f7e25454d5e9fe34
2022-07-17 19:48:40 +00:00
Erik Arvstedt 84b69dfb46
versioning: improve description wording 2022-07-17 12:46:01 +02:00
Otto Sabart 03b75a0254
bitcoind-remote: fix quotation marks in preStart script 2022-07-15 23:40:16 +02: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 9ac3d93b27
improve comments, descriptions 2022-07-15 01:50:11 +02:00
Erik Arvstedt 97b1a1d353
operator: improve descriptions 2022-07-14 23:47:12 +02:00
Erik Arvstedt 27dd31ead5
clightning/feeadjuster: fix typo 2022-07-14 23:46:25 +02:00
Erik Arvstedt df5abd5eab
lnd: move `wallet-unlock-password-file` setting to config
There's no need to pass this option via the cmdline.
2022-07-14 23:46:25 +02:00
Erik Arvstedt 7d7f2df006
fulcrum: add module 2022-07-09 11:07:09 +02:00
Jonas Nick 7e94b7eddc
Merge fort-nix/nix-bitcoin#510: lnd, lightning-loop: add certificate options `extraIPs` and `extraDomains`
c853f380d4 lightning-loop: add certificate options `extraIPs` and `extraDomains` (Erik Arvstedt)
edfbe700e7 lnd: add certificate options `extraIPs` and `extraDomains` (Erik Arvstedt)
60a27d58a6 lnd, lightning-loop: improve `extraConfig` option description (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK c853f380d4

Tree-SHA512: f83ddd99826fdcae964de2ff7f45ca941f0ffb6130f5e4f8481d7e2c9946ebea8415460c0cfe68a9626a2fb0d6912e5285b580db00d78bfcfdac665426bf3649
2022-07-08 20:57:37 +00:00
Erik Arvstedt edd8bd311c
bitcoind-rpc-public-whitelist: add `ping`, `help`
Required by fulcrum.
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 60a27d58a6
lnd, lightning-loop: improve `extraConfig` option description 2022-07-07 16:09:26 +02:00
Jonas Nick 4c9efa9db9
Merge fort-nix/nix-bitcoin#503: nodeinfo: make extensible
f17fcebe11 nodeinfo: make extensible (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK f17fcebe11

Tree-SHA512: 8f4cca757c6b6323a6cb947a9a452cb57743242935e29c4dc1efe3920f7c1930766b09f8a875830f1eaf6b4c9079c452600c86aef81b57748b7cebb3d620eafa
2022-07-07 08:24:33 +00:00
Erik Arvstedt 99f1dc0bff
bitcoind, liquidd: increase `TimeoutStartSec`
I've just seen `liquidd` hit the timeout on nixbitcoin.org while
`Loading block index`.
This was probably due to HDD contention while starting services during
boot.
2022-07-05 13:04:18 +02:00
Erik Arvstedt f17fcebe11
nodeinfo: make extensible
Module authors can now add extra services via option `nix-bitcoin.nodeinfo.services`.
Mark as internal because we're not yet providing a user-friendly, stable API.
2022-07-05 10:11:55 +02: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
Alekos Filini 961192313c
Fix cln rpc path for btcpayserver on regtest 2022-06-03 23:39:36 +02:00
nixbitcoin cb295d1a16
joinmarket: 0.9.5 -> 0.9.6 2022-06-03 08:56:35 +00:00
Erik Arvstedt cbf327c808
lndconnect-onion: fix for custom operator names 2022-06-02 12:38:33 +02:00
elsirion 1054e9a3b1
Add cln feeadjuster plugin 2022-05-27 11:21:58 +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 ae94665ad1
clightning: add `package` option 2022-05-22 15:57:15 +02:00
Erik Arvstedt ef93a9a8bd
rtl: formatting 2022-05-20 13:28:45 +02:00
Erik Arvstedt 15288d58e1
lnd: rename var `mnemonic` -> `seed`
This matches lnd's terminology.
2022-05-17 13:19:38 +02: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
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 e6bb281a88
services: set systemd list options as list values
This makes our list definitions mergeable with custom list values
set by users.
Previously, a module error ("value is a string while a list
was expected") was thrown instead.

This commit was partly auto-generated with this script:

#!/usr/bin/env ruby
Dir["**/*.nix"].each do |file|
  src = File.read(file)
  fixed = src.gsub(/ReadWritePaths *= *(.*?);/) do
    "ReadWritePaths = [ #{$1} ];"
  end
  File.write(file, fixed) if fixed != src
end
2022-05-07 20:37:02 +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
Erik Arvstedt c30aa33c15
cl-rest: rename pkg to clightning-rest 2022-05-06 16:24:59 +02:00
Jonas Nick 43ee7668ab
joinmarket: explicitly create no descriptor wallet
The default value of `descriptors` has changed from `false` to `true` in
Bitcoin Core 23.0.
2022-05-06 13:35:28 +00:00
Erik Arvstedt 7de56b019f
nbxplorer: use postgresql
The former DBTrie backend has been deprecated.
2022-05-06 13:35:27 +00:00
Erik Arvstedt 66b19403a6
clboss: fix clboss being enabled by default 2022-05-05 16:58:16 +02:00
Erik Arvstedt f08b83bce2
clboss: update module 2022-04-26 12:04:32 +02:00
Jonas Nick 06d4a22902
Merge fort-nix/nix-bitcoin#469: lnd: Use `lndinit` for wallet creation
a4a5c72b01 lnd: use `lndinit` for wallet creation (Erik Arvstedt)
e793a3470c lndinit: init at 0.1.3-beta (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK a4a5c72b01
  jonasnick:
    utACK a4a5c72b01

Tree-SHA512: 5295c1014a5b7bed4b7347b2d671fd877fd719323ea5156bd3bcff6ec94004949f22a9d0698fcc1de925855d36d81d9ea0148dbf0c079ab77e5437a9f53b2bb8
2022-04-11 04:33:16 +00:00
Erik Arvstedt a4a5c72b01
lnd: use `lndinit` for wallet creation 2022-04-04 13:59:36 +02: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
Erik Arvstedt 91203d8d06
secrets: fix secrets setup warning
With newer nixpkgs versions, a type error was shown instead of the
warning message when `secretsSetupMethod` was unset.
2022-03-11 01:34:47 +01:00
nixbitcoin 5bee663e30
backups: bring in line with upstream duplicity
Also, tell users that they can set `services.duplicity.*` to further
configure the backup.
2022-03-06 14:31:19 +00:00
Jonas Nick 19abacc41c
Merge fort-nix/nix-bitcoin#458: liquidd: add service timeouts like in bitcoind
2493c8c201 liquidd: add service timeouts like in bitcoind (Erik Arvstedt)
59bf0274c0 pkgs: add groups, sort alphabetically (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK 2493c8c201

Tree-SHA512: 229f57a4093b996d500f95f81992b7f0314596828639179ed57936a4bc5d0f556498bf29e1acd9aabd3cbee97f034ccabd9dad2fde01deddc5e226c6c46c7bb2
2022-03-01 14:21:39 +00:00
Erik Arvstedt 2493c8c201
liquidd: add service timeouts like in bitcoind
Previously, liquidd could fail with error:
liquidd.service: start operation timed out. Terminating.
2022-02-28 14:01:54 +01: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 0ac9d6f4c8
Merge fort-nix/nix-bitcoin#450: Misc. improvements
d959d5b558 secure-node: don't set `nix-bitcoin.secretsDir` (Erik Arvstedt)
7b0c3d48c9 docs/services.md: link to clightning plugin list (Erik Arvstedt)
7402212263 examples/configuration.nix: disable `passwordAuthentication` (Erik Arvstedt)
e093bb64d9 examples/configuration.nix: fix links to `docs/services.md` (Erik Arvstedt)
d41a550355 fetch-release: export GNUPGHOME (Erik Arvstedt)
397b372cf3 bitcoind: improve option `rpc.users` (Erik Arvstedt)
679e7b6544 bitcoind: remove unneeded tmpfile rule (Erik Arvstedt)
98f419233f bitcoind: don't log timestamps (Erik Arvstedt)
6f8b4d9ebe flake: optimize nixpkgs importing (Erik Arvstedt)
16e2d4c8b7 flake: remove unneeded indirection in legacyPackages (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK d959d5b558

Tree-SHA512: e62fcf36ac77df62b9f86279d0ebac807525d188cbf1ee5c13cf1406b3caadad0f2df7527b0c8713259cbc6d5cdfa006f01e90d5377f974213f204a2f85a8ae6
2022-02-06 17:00:59 +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 397b372cf3
bitcoind: improve option `rpc.users`
- Move description to top
- Improve example
2022-02-03 20:47:25 +01:00
Erik Arvstedt 679e7b6544
bitcoind: remove unneeded tmpfile rule 2022-02-03 20:47:25 +01:00
Erik Arvstedt 98f419233f
bitcoind: don't log timestamps
Timestamps are already logged via journald.
2022-02-03 20:47:25 +01:00
Konstantin Nick 793a127372 [LND] Remove pruning assertion 2022-02-03 09:34:24 +01:00
Erik Arvstedt d8af0aca02
lnd: improve service initialization
- Use systemd startup notification.
- Use new option `--wallet-unlock-password-file` instead of
  manual unlocking.
2022-01-15 22:49:05 +01:00
nixbitcoin 40c5f63f04
joinmarket: fix fidelity bond default values 2022-01-11 11:05:42 +00:00
Erik Arvstedt bf92d6094d
bitcoind: fix error when defining passwordHMAC for RPC users 2022-01-07 03:32:07 +01:00
Erik Arvstedt 5ab85cb2a5
pkgs: add `meta` attr
Also add more detailed `enable` option descriptions.
2021-12-15 14:39:31 +01:00
Erik Arvstedt 602281b132
rtl, cl-rest: add /bin to pkg output 2021-12-15 10:58:04 +01:00
Erik Arvstedt d296b2d1fb
charge-lnd: remove unneeded use of `literalExample` 2021-12-15 10:58:04 +01:00
Erik Arvstedt bbebd0b383
treewide: remove invalid docbook XML from option descriptions
NixOS will soon use CommonMark Markdown for option descriptions.
We can then switch back the old, slightly clearer bracket syntax.
2021-12-12 16:20:40 +01:00
Erik Arvstedt 3681f118f7
nix-bitcoin.nix: add `defaultText` (automatic)
This enables generating module option documentation.

This commit was genereated by running the following script inside the
repo root dir:

def add_default_text(file)
  src = File.read(file)
  src2 = src.gsub(/( = mkOption\s+\{[^{]*?)(\n\s+default = )(.*?);$(.*?\})/m) do |str|
    pre, defaultVar, default, post = Regexp.last_match.captures
    replacement =
      if !post.include?('defaultText =')
        if default =~ /\bpkgs\b/
          defaultText = default.lines.length == 1 ? default : "(See source)"
          "#{pre}#{defaultVar}#{default};#{defaultVar.sub('default', 'defaultText')}#{defaultText.inspect};#{post}"
        end
      end
    replacement or str
  end
  File.write(file, src2) if src2 != src
end

Dir["modules/**/*.nix"].each do |f|
  next if File.basename(f) == "nix-bitcoin.nix"
  add_default_text f
end
2021-12-12 16:20:39 +01:00
Erik Arvstedt d24c029435
treewide: add `defaultText` (manual)
This enables generating module option documentation.

Add `defaultText` to options where the default value can't be
evaluated during metadata generation.
2021-12-12 16:18:14 +01:00
Erik Arvstedt f0096371bf
btcpayserver: expand `nbPkgs` in option defaults
Required by commit `nix-bitcoin.nix: add `defaultText` (automatic)`.
2021-12-11 13:27:51 +01:00
Erik Arvstedt 349f904e79
secrets: use assertion instead of error in default value
This enables generating module option documentation.
2021-12-11 13:27:48 +01:00
Erik Arvstedt 2f0f1ec15a
hardened-extended: define kernelParams as separate strings
This is now checked by the modules.
2021-12-10 12:16:31 +00:00
Erik Arvstedt 71e9864060
netns-isolation: add compatibility with 21.11
`security.wrappers` now requires `group` be defined.
2021-12-10 12:16:09 +00:00
nixbitcoin b5984a603c
joinmarket: 0.9.3 -> 0.9.4
Ilita IRC server & use upstream twisted again
2021-12-08 12:38:28 +00:00
nixbitcoin 1a8e7d6348
clightning: re-enable seccomp filtering 2021-12-08 12:38:10 +00:00
Erik Arvstedt 6b539627ee
add presets/bitcoind-remote.nix
This simplifies integrating a remote bitcoind instance and
makes `bitcoin-cli` work with the remote node.

Add note regarding `whitelistedPort` to docs.
2021-12-07 15:35:33 +01:00
Erik Arvstedt 1596b3a5d2
minor fixes
- README: fix uppercase

- bitcoind: add whitespace

- hardware-wallets: remove unused variables
2021-12-07 15:35:33 +01: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 def64a73b8
treewide: use TODO-EXTERNAL
Use TODO-EXTERNAL for TODOs that depend on external factors like
upstream fixes.
2021-11-29 13:47:48 +01:00
Erik Arvstedt 6f37bef2a3
netns-isolation: simplify firewall setup
Set all allowed INPUT/OUTPUT addresses in a single `iptables` command.
2021-11-29 13:47:48 +01:00
Erik Arvstedt 9e4f4d6b0f
bitcoind: add option `txindex` 2021-11-29 13:22:44 +01: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
Erik Arvstedt 9bda7305fd
services: add `tor.*` options
Split `enforceTor` into `tor.proxy` and `tor.enforce`.
By enabling `tor.proxy` without `tor.enforce`, a service can accept
incoming clearnet connections.
E.g., this allows setting up a Tor-proxied bitcoind node that accepts
RPC connections from LAN.
2021-11-29 13:22:43 +01:00
Erik Arvstedt ff24e73ad7
onion-addresses: fix files not being copied
When NixOS is already running and Tor is restarted due to config
changes, `/var/lib/tor/state` may be present even when Tor has not
yet finished setting up onion services.
This caused the previous version of `onion-addresses` to not wait for
Tor and to skip not yet present onion service files.

`onion-addresses` now waits until each required onion service file
has appeared.
2021-11-29 13:22:43 +01:00
Erik Arvstedt c6fe017aeb
netns-isolation: avoid creating service files for disabled services
Only set the `serviceConfig` option when the service is enabled.
Otherwise a service file is created.
2021-11-29 13:22:43 +01:00
Erik Arvstedt 017e08ca10
btcpayserver: move nbxplorer options to bottom
These are largely irrelevant to end users.
2021-11-28 21:18:49 +01:00
Erik Arvstedt e1d869d76c
modules.nix: move rtl to fix topological sorting
rtl depends on lnd and lightning-loop.
2021-11-28 21:18:47 +01:00
Erik Arvstedt e44cd7ecdc
rtl: improve descriptions
Also move cl-rest to the bottom.
2021-11-28 21:18:44 +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
Jonas Nick 76737ead9f
update nixpkgs
btcpayserver: 1.3.3 -> 1.3.6
electrs: 0.9.2 -> 0.9.3
lnd: 0.13.3-beta -> 0.14.1-beta
nbxplorer: 2.2.16 -> 2.2.18

electrs does not accept command line argument -vv anymore, so we have to use
--log-filter instead.
2021-11-28 17:34:10 +00:00
Jonas Nick 6673c8245c
Merge fort-nix/nix-bitcoin#423: Misc. improvements
4a74b7de08 clightning: work around unsupported seccomp syscall (Erik Arvstedt)
38a843d005 clightning: update python pkgs to new version (Erik Arvstedt)
6ad7107ddb update nixpkgs (Erik Arvstedt)
f58d67677e netns-isolation: separate host and netns setup (Erik Arvstedt)
cb6e5ef702 netns-isolation: fix routing issues due to netns restarting (Erik Arvstedt)
7f77147b60 makeShell: minor improvements (Erik Arvstedt)
a5730eb736 makeShell: make the help msg a shell derivation variable (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 4a74b7de08

Tree-SHA512: 75454b51db6d7ab41590d8579e0a5136e5ac1be78d5c2f547c6ef1982c0de679968879bb9bac57dd66413f59a4659236601ab75414486b0137c7c43d73d22759
2021-11-10 21:57:16 +00:00
Erik Arvstedt 4a74b7de08
clightning: work around unsupported seccomp syscall 2021-11-10 21:26:56 +01:00
nixbitcoin f569227410
rtl: add module 2021-11-09 14:13:42 +00:00
Erik Arvstedt f58d67677e
netns-isolation: separate host and netns setup
- Improves readability

- `netns exec ...` (called via `netnsIptables`) incurs a large
  overhead: In addition to netns switching, a mount namespace
  is setup and populated with the contents of /etc/netns/<ns>/.
  Instead, simply run `nsenter`.
2021-11-08 12:46:28 +01:00
Erik Arvstedt cb6e5ef702
netns-isolation: fix routing issues due to netns restarting
Previously, restarting a service implied restarting its netns.
For unknown reasons, this sometimes caused the netns-local address
to not be routable from the root netns for up to 20 s.
I.e., the service was sometimes unreachable after restarting.

Now the netns is no longer stopped when the service is stopped.
2021-11-08 12:46:27 +01:00
Jonas Nick 3f844c06f0
Merge fort-nix/nix-bitcoin#418: update nixpkgs
b3e868d0af tests/regtest: disable incompatible `validatepegin` for liquidd (Erik Arvstedt)
c30fe1919b netns-isolation: don't auto-assign IPv6 addrs to peer links (Erik Arvstedt)
6584540828 makeShell: make help message extensible (Erik Arvstedt)
0478354477 versioning: move variable (Erik Arvstedt)
8616254d63 bitcoind-rpc-public-whitelist: remove waitfornewblock (Erik Arvstedt)
083e141e3e tests/btcpayserver: test bitcoind P2P connection in regtest (Erik Arvstedt)
82c92df162 tests/regtest: fix restarting bitcoind (Erik Arvstedt)
49086abcc5 liquidd: use systemd startup notification (Erik Arvstedt)
b83fd845c2 update nixpkgs (nixbitcoin)
852c112603 Use HTTPS URL for spark-wallet GitHub node packages (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK b3e868d0af
  jonasnick:
    utACK b3e868d0af

Tree-SHA512: 300410157a54f90f40abda064ed9b8f2310e3002bd2eac0527404d5402cd7d87c2d2d1d79d68cf1569841645c333b281d706607deae9461e1ef07f6c20427297
2021-11-03 10:25:38 +00:00
cadwgan0 ae1c90997d missing sys import for error path set_onion_address 2021-11-02 23:25:55 -04: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 c30fe1919b
netns-isolation: don't auto-assign IPv6 addrs to peer links
This simplifies the host's address configuration.

This also removes unused addresses that are returned when resolving
container hostnames via nss-mymachines:
`getent ahosts nb-test`
2021-11-02 17:40:43 +01:00
Erik Arvstedt 0478354477
versioning: move variable
The variable is an internal implementation detail. Move it close to
where it's used.
2021-11-02 17:40:43 +01:00