banlist: simplify script, remove package
We're now directly using Greg's unmodified banlist which simplifies the update process. The banlist package with its dependency on the bitcoin datadir path is only relevant for internal use within nix-bitcoin, so we can safely remove it. We're now using the bitcoin-cli from `services.bitcoind.package`. Fixes #129
This commit is contained in:
5600
modules/banlist.cli.txt
Normal file
5600
modules/banlist.cli.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -264,6 +264,9 @@ in {
|
||||
else nix-bitcoin-services.allowAnyIP)
|
||||
// optionalAttrs (cfg.zmqpubrawblock != null || cfg.zmqpubrawtx != null) nix-bitcoin-services.allowAnyProtocol;
|
||||
};
|
||||
|
||||
# Use this to update the banlist:
|
||||
# wget https://people.xiph.org/~greg/banlist.cli.txt
|
||||
systemd.services.bitcoind-import-banlist = {
|
||||
description = "Bitcoin daemon banlist importer";
|
||||
requires = [ "bitcoind.service" ];
|
||||
@@ -289,11 +292,16 @@ in {
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
User = "${cfg.user}";
|
||||
Group = "${cfg.group}";
|
||||
ExecStart = "${pkgs.bash}/bin/bash ${pkgs.banlist}/bin/banlist ${pkgs.blockchains.bitcoind}";
|
||||
script = ''
|
||||
echo "Importing node banlist..."
|
||||
cd ${cfg.cli}/bin
|
||||
. ${./banlist.cli.txt}
|
||||
'';
|
||||
|
||||
# Permission for preStart
|
||||
PermissionsStartOnly = "true";
|
||||
|
||||
@@ -189,7 +189,6 @@ in {
|
||||
blockchains.bitcoind
|
||||
(hiPrio config.services.bitcoind.cli)
|
||||
nodeinfo
|
||||
banlist
|
||||
jq
|
||||
qrencode
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user