Skip to content

Commit e3190b2

Browse files
committed
Merge #610: update nixpkgs
af87d59 obsolete-options: simplify removal of clightning plugin `commando` (Erik Arvstedt) 9b575e4 test/backups: check that bitcoind stops without errors (Erik Arvstedt) 8a791b7 rtl: 0.13.6 -> 0.14.0 (Erik Arvstedt) 3650d4b bitcoin: replace nixpkgs package with bitcoin{,d} 24.1 (Jonas Nick) 75e54bb spark-wallet: remove package and module (Jonas Nick) 29a95ea clightning-rest: update module to v0.10.3 (Erik Arvstedt) 67475f7 clightning-rest: 0.9.0 -> 0.10.3 (Erik Arvstedt) fe76516 bitcoind: update module to v25.0 (Erik Arvstedt) 9c59b96 clightning-plugins: add prometheus patch for clightning 23.05 (Jonas Nick) 9aea69e clightning-plugins: update (Jonas Nick) 2166bfd clboss: deprecate, add clighting 23.05 compatibility (Erik Arvstedt) dcc5a54 update nixpkgs (Jonas Nick) Pull request description: ACKs for top commit: erikarvstedt: ACK af87d59 Tree-SHA512: 8bc6bc1aa01f342047b9b5cc468ab4af1f71a16d7f575f7e5108f2dfb0121160d777ead5b6714506a911066d594a37c6e14b774eb1bc1cb674ddea85e2e33c5a
2 parents d9baa2e + af87d59 commit e3190b2

33 files changed

+216
-2951
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ NixOS modules ([src](modules/modules.nix))
9090
clightning [via WireGuard](./docs/services.md#use-zeus-mobile-lightning-wallet-via-wireguard) or
9191
[Tor](./docs/services.md#use-zeus-mobile-lightning-wallet-via-tor)
9292
* [Ride The Lightning](https://github.com/Ride-The-Lightning/RTL): web interface for `lnd` and `clightning`
93-
* [spark-wallet](https://github.com/shesek/spark-wallet)
9493
* [electrs](https://github.com/romanz/electrs): Electrum server
9594
* [fulcrum](https://github.com/cculianu/Fulcrum): Electrum server (see [the module](modules/fulcrum.nix) for a comparison with electrs)
9695
* [btcpayserver](https://github.com/btcpayserver/btcpayserver)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ all other security vulnerabilities.
4545
| Type | Description | Examples |
4646
| :-: | :-: | :-: |
4747
| Outright Vulnerabilities | Vulnerabilities in nix-bitcoin specific tooling (except CI tooling) | privilege escalation in SUID binary `netns-exec`, improper release signature verification through `fetch-release` |
48-
| Violations of [PoLP](https://en.wikipedia.org/wiki/Principle_of_least_privilege) | nix-bitcoin services are given too much privilege over the system or unnecessary access to other nix-bitcoin services, or one of the nix-bitcoin isolation measures is incorrectly implemented | `netns-isolation` doesn't work, spark-wallet has access to bitcoin RPC interface or files |
48+
| Violations of [PoLP](https://en.wikipedia.org/wiki/Principle_of_least_privilege) | nix-bitcoin services are given too much privilege over the system or unnecessary access to other nix-bitcoin services, or one of the nix-bitcoin isolation measures is incorrectly implemented | `netns-isolation` doesn't work, RTL has access to bitcoin RPC interface or files |
4949
| Vulnerabilities in Dependencies | A vulnerability in any dependency of a nix-bitcoin installation with a configuration consisting of any combination of the following services: bitcoind, clightning, lnd, electrs, joinmarket, btcpayserver, liquidd.<br />**Note:** The vulnerability must first be reported to and handled by the maintainers of the dependency before it qualifies for a reward| Compromised NixOS expression pulls in malicious package, JoinMarket pulls in a python dependency with a known severe vulnerability |
5050
| Bad Documentation | Our documentation suggests blatantly insecure things | `install.md` tells you to add our SSH keys to your root user |
5151
| Compromise of Signing Key | Compromise of the nix-bitcoin signing key, i.e., `0xB1A70E4F8DCD0366` | Leaking the key, managing to sign something with it |

dev/dev-features.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -127,22 +127,6 @@ c systemctl status clightning-rest
127127
c journalctl -u clightning-rest
128128
c systemctl status clightning-rest-migrate-datadir
129129
130-
#―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
131-
# spark-wallet
132-
133-
run-tests.sh -s "{
134-
services.spark-wallet.enable = true;
135-
test.container.exposeLocalhost = true;
136-
}" container
137-
138-
c systemctl status spark-wallet
139-
c journalctl -u spark-wallet
140-
141-
sparkAuth=$(c cat /secrets/spark-wallet-login | grep -ohP '(?<=login=).*')
142-
curl -v http://$sparkAuth@$ip:9737
143-
# Open in browser
144-
runuser -u "$(logname)" -- xdg-open http://$sparkAuth@$ip:9737
145-
146130
#―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
147131
# electrs
148132

docs/services.md

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -291,49 +291,6 @@ Create a plain text URL:
291291
lndconnect-wg --url
292292
``````
293293

294-
# Connect to spark-wallet
295-
### Requirements
296-
* Android phone
297-
* [Orbot](https://guardianproject.info/apps/orbot/) installed from [F-Droid](https://guardianproject.info/fdroid) (recommended) or [Google Play](https://play.google.com/store/apps/details?id=org.torproject.android&hl=en)
298-
* [Spark-wallet](https://github.com/shesek/spark-wallet) installed from [direct download](https://github.com/shesek/spark-wallet/releases) or [Google Play](https://play.google.com/store/apps/details?id=com.spark.wallet)
299-
300-
1. Enable spark-wallet in `configuration.nix`
301-
302-
Change
303-
```
304-
# services.spark-wallet.enable = true;
305-
```
306-
to
307-
```
308-
services.spark-wallet.enable = true;
309-
```
310-
311-
2. Deploy new `configuration.nix`
312-
313-
3. Enable Orbot VPN for spark-wallet
314-
315-
```
316-
Open Orbot app
317-
Turn on "VPN Mode"
318-
Select Gear icon under "Tor-Enabled Apps"
319-
Toggle checkbox under Spark icon
320-
```
321-
322-
4. Get the onion address, access key and QR access code for the spark wallet android app
323-
324-
```
325-
journalctl -eu spark-wallet
326-
```
327-
Note: The qr code might have issues scanning if you have a light terminal theme. Try setting it to dark or highlighting the entire output to invert the colors.
328-
329-
5. Connect to spark-wallet android app
330-
331-
```
332-
Server Settings
333-
Scan QR
334-
Done
335-
```
336-
337294
# Connect to electrs
338295
### Requirements Android
339296
* Android phone

examples/configuration.nix

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@
126126
# Automatically enables lightning-loop.
127127
# services.rtl.nodes.lnd.loop = true;
128128

129-
### SPARK WALLET
130-
# Set this to enable spark-wallet, a minimalistic wallet GUI for
131-
# c-lightning, accessible over the web or through mobile and desktop apps.
132-
# Automatically enables clightning.
133-
# services.spark-wallet.enable = true;
134-
135129
### ELECTRS
136130
# Set this to enable electrs, an Electrum server implemented in Rust.
137131
# services.electrs.enable = true;

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/bitcoind.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@ in {
414414
# Enable RPC access for group
415415
postStart = ''
416416
chmod g=r '${cfg.dataDir}/${optionalString cfg.regtest "regtest/"}.cookie'
417+
'' + (optionalString cfg.regtest) ''
418+
chmod g=x '${cfg.dataDir}/regtest'
417419
'';
418420

419421
serviceConfig = nbLib.defaultHardening // {

modules/clightning-plugins/clboss.nix

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ let cfg = config.services.clightning.plugins.clboss; in
1212
See also: https://github.com/ZmnSCPxj/clboss#operating
1313
'';
1414
};
15+
acknowledgeDeprecation = mkOption {
16+
type = types.bool;
17+
default = false;
18+
internal = true;
19+
};
1520
min-onchain = mkOption {
1621
type = types.ints.positive;
1722
default = 30000;
@@ -49,13 +54,30 @@ let cfg = config.services.clightning.plugins.clboss; in
4954
};
5055

5156
config = mkIf cfg.enable {
57+
assertions = [
58+
{
59+
assertion = cfg.acknowledgeDeprecation;
60+
message = ''
61+
`clboss` is no longer maintained and has been deprecated.
62+
63+
Warning: For compatibility with clighting 23.05, the nix-bitcoin `clboss` package
64+
includes a third-party fix that has not been thoroughly tested:
65+
https://github.com/ZmnSCPxj/clboss/pull/162
66+
67+
To ignore this warning and continue using `clboss`, add the following to your config:
68+
services.clightning.plugins.clboss.acknowledgeDeprecation = true;
69+
'';
70+
}
71+
];
72+
5273
services.clightning.extraConfig = ''
5374
plugin=${cfg.package}/bin/clboss
5475
clboss-min-onchain=${toString cfg.min-onchain}
5576
clboss-min-channel=${toString cfg.min-channel}
5677
clboss-max-channel=${toString cfg.max-channel}
5778
clboss-zerobasefee=${cfg.zerobasefee}
5879
'';
80+
5981
systemd.services.clightning.path = [
6082
pkgs.dnsutils
6183
] ++ optional config.services.clightning.tor.proxy (hiPrio config.nix-bitcoin.torify);

modules/clightning-rest.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ in {
9797
Restart = "on-failure";
9898
RestartSec = "10s";
9999
ReadWritePaths = [ cfg.dataDir ];
100+
inherit (nbLib.allowNetlink) RestrictAddressFamilies;
100101
} // nbLib.allowedIPAddresses cfg.tor.enforce
101102
// nbLib.nodejs;
102103
};

modules/modules.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
./clightning-plugins
1515
./clightning-rest.nix
1616
./clightning-replication.nix
17-
./spark-wallet.nix
1817
./lnd.nix
1918
./lightning-loop.nix
2019
./lightning-pool.nix

0 commit comments

Comments
 (0)