Commit Graph

1343 Commits

Author SHA1 Message Date
Jonas Nick
4875314b6f
clboss: 0.10 -> 0.11A 2021-04-11 12:39:08 +00:00
Jonas Nick
8594ddfb87
Merge #350: Update nixos unstable
daeedda825 clightning-plugins: update rev and dependencies (nixbitcoin)
c5f67629e6 joinmarket: add copy of cryptography 3.3.2 (Erik Arvstedt)
ca0c6289d7 update nixpkgs-unstable (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK daeedda825

Tree-SHA512: 5fc79e50b68fa4c584a2e861a5bf07298595ac6f2eb0e6e9d9351440e51dca4d33a6c09e417e624791153f160cdbeba014ef0ee6b9d6ea28f0b46f64a9c46396
2021-04-10 13:21:14 +00:00
nixbitcoin
daeedda825
clightning-plugins: update rev and dependencies 2021-04-09 16:10:33 +02:00
Erik Arvstedt
c5f67629e6
joinmarket: add copy of cryptography 3.3.2 2021-04-07 19:05:40 +02:00
nixbitcoin
ca0c6289d7
update nixpkgs-unstable
btcpayserver: 1.0.7.0 -> 1.0.7.2
clightning: 0.9.3 -> 0.10.0
2021-04-07 10:02:19 +00:00
Jonas Nick
ca71eb01d2
Merge #349: elementsd: 0.18.1.9 -> 0.18.1.11
9bb2c02978 elementsd: 0.18.1.9 -> 0.18.1.11 (nixbitcoin)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 9bb2c02978

Tree-SHA512: c9ab3588eee0fd19ca23ebcf50b70547614ad6a67958e23cf5b1779c795505166b168a45cc8d6a8e2863aa4ded1cc81d795d495cd551e557592d052ecccf16d6
2021-04-02 13:00:31 +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
Jonas Nick
8a531f5cf7
Merge #307: Madaidan hardening
1ff5f8f01b hardening: use generic hostname by default (nixbitcoin)
d56a363d3d services: improve default hardening (nixbitcoin)
3b938a909f add hardened-extended preset (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 1ff5f8f01b

Tree-SHA512: 4355dc4b1dab33c363e8133fe7dd909db74e4ab5c58a3d0f2d9628f2877acdaf1ac63164bcc5d68cf682ba81e5cf36c3fdbaffa74310a9454637647c5531ce3e
2021-04-02 12:55:37 +00:00
nixbitcoin
9bb2c02978
elementsd: 0.18.1.9 -> 0.18.1.11 2021-04-02 11:03:03 +00:00
nixbitcoin
1ff5f8f01b
hardening: use generic hostname by default
Minimize identifying information
2021-04-02 10:59:21 +00:00
nixbitcoin
d56a363d3d
services: improve default hardening 2021-04-02 10:59:17 +00:00
nixbitcoin
3b938a909f
add hardened-extended preset 2021-04-02 10:59:09 +00:00
Jonas Nick
4a2bc280e0
Merge #347: lightning-loop: 0.12.0 -> 0.12.1
cde9597fc4 lightning-loop: 0.12.0 -> 0.12.1 (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK cde9597fc4

Tree-SHA512: 30c0eb34c5b7a8a9f592bc4d5b52cbc983efa9c9be08cc3cf0c117a7d67ce251ba0a1e87495eeea010642dae2259821ebbd42fde9880a0212ef1e7dac04e2d25
2021-03-28 18:07:41 +00:00
Erik Arvstedt
3cce822c64
run-tests: add 'vm' command 2021-03-26 23:23:22 +01:00
nixbitcoin
cde9597fc4
lightning-loop: 0.12.0 -> 0.12.1 2021-03-26 09:31:11 +00:00
Jonas Nick
aea1706e49
Merge #345: electrs: 0.8.8 -> 0.8.9
d5c53e1510 electrs: 0.8.8 -> 0.8.9 (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK d5c53e1510

Tree-SHA512: f57bd85e2c9ca592774d1e5aaa13042cdf6f3887715e99ed6a0aa9a4d5f5e3c9b32200c616ba2a51b7d50ab414297ea79cca0a0be5002c3cf1b1c92023a6e9c5
2021-03-22 19:58:28 +00:00
Jonas Nick
9ae2c8a6d2
Merge #339: Misc improvements
4cddf284e9 treewide: remove use of deprecated `stdenv.lib` (Erik Arvstedt)
6ba5880b2c test.py: improve composability of test 'banlist-and-restart' (Erik Arvstedt)
44439e2a81 tests: optimize building multiple tests at once (Erik Arvstedt)
9ca52af523 tests: improve make-test-vm.nix (Erik Arvstedt)
08fe9ba84a services: add finer-grained address family restrictions (Erik Arvstedt)
020433cec6 services: add helper fn setAllowedIPAddresses (Erik Arvstedt)
cdf27d9d0c bitcoind: improve service timeouts (Erik Arvstedt)
09cd3ce5e4 lnd: show curl error messages (Erik Arvstedt)
d214605b32 spark-wallet: add flakes compatibility (Erik Arvstedt)
81db927f66 spark-wallet/generate: remove supplement.json (Erik Arvstedt)
84b3217c3d fetch-release: minor improvements (Erik Arvstedt)
45d0964e27 examples/shell.nix: minor improvements (Erik Arvstedt)
cc7149eb78 examples: improve robustness of deploy scripts (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  nixbitcoin:
    ACK 4cddf284e9

Tree-SHA512: 5f863a406a56b4b916ea662c411dce6884a7633a49e862015ddf68c20e772a14108095782753c2e33061d8d19cbf9053239f98644cb12fd883ef79e68d8a977b
2021-03-22 15:52:04 +00:00
Erik Arvstedt
4cddf284e9
treewide: remove use of deprecated stdenv.lib 2021-03-22 14:39:32 +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
08fe9ba84a
services: add finer-grained address family restrictions
Due to a possible NixOS bug, this commit has no effect on NixOS 20.09
where `RestrictAddressFamilies` is a no-op.
It's only relevant for NixOS unstable with cgroups v2.

bitcoind+zmq: instead of allowing all address families, only add the required
AF_NETLINK family.

lnd: lnd only runs a zmq client, not a server, therefore it requires
no additional address families.

lightning-pool, clightning-plugin-zmq: add AF_NETLINK.
2021-03-22 14:35:29 +01:00
Erik Arvstedt
020433cec6
services: add helper fn setAllowedIPAddresses
Also use 'allowLocalIPAddresses' instead of 'allowTor' in bitcoind-import-banlist
which doesn't use Tor.
2021-03-22 13:20:45 +01:00
nixbitcoin
d5c53e1510
electrs: 0.8.8 -> 0.8.9 2021-03-22 11:54:28 +00:00
Erik Arvstedt
cdf27d9d0c
bitcoind: improve service timeouts
- Improve readability by using minutes
- set `TimeoutStopSec` like in bitcoin/contrib/init/bitcoind.service.
  Stopping bitcoind can exceed the default timeout during IBD.
2021-03-16 12:46:19 +01:00
Erik Arvstedt
09cd3ce5e4
lnd: show curl error messages 2021-03-16 12:46:19 +01:00
Erik Arvstedt
d214605b32
spark-wallet: add flakes compatibility
Pure flakes can't use NIX_PATH.
2021-03-16 12:46:19 +01:00
Erik Arvstedt
81db927f66
spark-wallet/generate: remove supplement.json
This file is empty and has no effect.
2021-03-16 12:46:19 +01:00
Erik Arvstedt
84b3217c3d
fetch-release: minor improvements
This script is potentially fetched from an untrusted source and should
be in good shape to be easily auditable.

- Create just one TMPDIR
- Improve comments
- Use `cut` to extract sha256
- Use camelCase var names like in other scripts
2021-03-16 12:46:18 +01:00
Erik Arvstedt
45d0964e27
examples/shell.nix: minor improvements
- Use idiomatic var name `pkgs` for the imported nixpkgs.
- Don't add `figlet` to PATH because it's only used internally.
- Only print figlet in interactive shells to avoid interfering with
  stdout when running `nix-shell --run <cmd>`.
- Define `fetch-release` as a function to enable running it via
  `nix-shell --run fetch-release`
2021-03-16 12:46:18 +01:00
Erik Arvstedt
cc7149eb78
examples: improve robustness of deploy scripts
- The scripts now work within arbitrary nix-shells.
  Previously, they failed when run from nix shells other than
  `examples/shell.nix`.

- The scripts now work from arbitrary working dirs.
2021-03-16 12:46:18 +01:00
Jonas Nick
4022f86b92
Merge #296: Remove nixops examples and as recommended deployment method; replace with krops
520a983862 docs: nixops-krops migration guide (nixbitcoin)
7c0b521785 docs: describe deploying with krops in installation tutorial (Jonas Nick)
eb6dff5478 docs: various improvements to installation tutorial (Jonas Nick)
e8b47f099c examples: add deploy-krops.sh (Erik Arvstedt)
fe118b28ff examples: add krops deployment method (Jonas Nick)
e017675d5e krops: add package (Jonas Nick)
03db1a61b1 lnd, joinmarket: don't write to secrets dir (Erik Arvstedt)
55d87490ec secrets: make configuration more robust (Erik Arvstedt)
b0c223e716 secrets: don't stop services when the secrets target stops (Erik Arvstedt)
b701cb5603 secrets: add option 'generateSecrets' (Erik Arvstedt)
03515a8da6 examples/qemu: disable hardened preset (Erik Arvstedt)
908af3bfb8 examples/deploy-qemu-vm: show progress when waiting (Erik Arvstedt)
ccba86a0f0 examples: extract common features for running QEMU VMs (Erik Arvstedt)
cb3d5446c8 examples: use relative paths to example files (Erik Arvstedt)
a4dabc7390 Remove nixops examples and documentation (Jonas Nick)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 520a983862

Tree-SHA512: 380fcda3528e703e8a218f92a216befbee6cc279952388b2df48c1bcb803b72336bbe6e4deed87f3f26caba7a5cb5ab60c2bcabf2b13eba56f34c47eb02e128a
2021-03-15 19:03:47 +00:00
nixbitcoin
520a983862
docs: nixops-krops migration guide 2021-03-15 19:02:58 +01:00
Jonas Nick
7c0b521785
docs: describe deploying with krops in installation tutorial 2021-03-15 19:02:58 +01:00
Jonas Nick
eb6dff5478
docs: various improvements to installation tutorial
- Update nixos iso
- Make sure to be root before parting and give instructions for checking
  UEFI vs. legacy
- Instead of making user replace automatically generated nixos config,
  explain how to add options.
- Add boot.loader options directly to hardware-configuration.nix
- Copy .gitignore when setting up a deployment dir
- Stress that the first config that is deployed remotely must include ssh key.
- Debian: 9 Strech -> Debian 10 Buster
- nix: 2.3.3 -> 2.3.10
2021-03-15 19:02:58 +01:00
Erik Arvstedt
e8b47f099c
examples: add deploy-krops.sh 2021-03-15 19:02:58 +01:00
Jonas Nick
fe118b28ff
examples: add krops deployment method 2021-03-15 18:53:07 +01:00
Jonas Nick
e017675d5e
krops: add package 2021-03-15 18:53:07 +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
55d87490ec
secrets: make configuration more robust
- Fail at evaluation when secrets setup is not configured.
  Previously, bitcoind failed at runtime due to the missing secrets target.

- Fail at evaluation when conflicting secrets setup methods are used.
  This happens when `secretsSetupMethod` has more than one definition.
2021-03-15 12:42:52 +00:00
Erik Arvstedt
b0c223e716
secrets: don't stop services when the secrets target stops
With krops or nixops the secrets target is always restarted during
the deployment process.
This previously caused unnecessary restarts of all nix-bitcoin services.
2021-03-15 12:42:52 +00: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
Erik Arvstedt
03515a8da6
examples/qemu: disable hardened preset
- Hardening is irrelevant in examples
- The decreased performance is especially noticeable in VMs
2021-03-15 12:42:52 +00:00
Erik Arvstedt
908af3bfb8
examples/deploy-qemu-vm: show progress when waiting
This improves the user experience on VM startup, which can take a few
seconds.
2021-03-15 12:42:51 +00:00
Erik Arvstedt
ccba86a0f0
examples: extract common features for running QEMU VMs
Needed by commit: "examples: add deploy-krops.sh"
2021-03-15 12:42:51 +00:00
Erik Arvstedt
cb3d5446c8
examples: use relative paths to example files
This ensures that the examples files from the current example dir are used.
Previously, the default examples from the nix-bitcoin source were used.
2021-03-15 12:42:51 +00:00
Jonas Nick
a4dabc7390
Remove nixops examples and documentation 2021-03-15 12:42:47 +00:00
Jonas Nick
b07185915a
Merge #331: nixops: remove libvirtd plugin
f1064761d7 nixops: remove libvirtd plugin (nixbitcoin)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK f1064761d7
  erikarvstedt:
    ACK f1064761d7

Tree-SHA512: 66c8fc20c2f210d5d37025cc1772330354a6a8ecbdb1fb9e8fcd1391030485c936ab28647f739bd90b083d627602ade39a5575114d69db8e8d1375989d5cdd0e
2021-03-14 14:42:43 +00:00
Jonas Nick
1377cf5147
Merge #337: joinmarket: 0.8.1 -> 0.8.2
5ead2a7075 joinmarket: 0.8.1 -> 0.8.2 (nixbitcoin)

Pull request description:

ACKs for top commit:
  erikarvstedt:
    ACK 5ead2a7075

Tree-SHA512: 2ac87f74a1008c058adef81d11049d985a64f435d75ef61584e8debdcc985f78c1d43430c09ee71c247a93908a5ba3a1efdcf91b0666a84b3269509a99685343
2021-03-10 21:24:12 +00:00
nixbitcoin
5ead2a7075
joinmarket: 0.8.1 -> 0.8.2
- add SNICKER to default config
- update package
- ob-watcher: copy vendorized js and css dependencies
- add missing dependency to jmbase
- use cryptography from pinned.nixpkgs-unstable
2021-03-10 13:33:49 +00:00