bitcoind: switch from rpcpassword to rpcauth

Includes bitcoind's `share/rpcauth` to convert apg generated passwords
into salted HMAC-SHA-256 hashed passwords.
This commit is contained in:
nixbitcoin 2020-06-22 12:10:54 +00:00
parent 272b8568e7
commit 5a978a2836
No known key found for this signature in database
GPG key ID: DD11F9AD5308B3BA
9 changed files with 84 additions and 24 deletions

View file

@ -74,7 +74,7 @@ in {
requires = [ "bitcoind.service" ];
after = [ "bitcoind.service" ];
preStart = ''
echo "cookie = \"${config.services.bitcoind.rpcuser}:$(cat ${secretsDir}/bitcoin-rpcpassword)\"" \
echo "cookie = \"${config.services.bitcoind.rpc.users.public.name}:$(cat ${secretsDir}/bitcoin-rpcpassword-public)\"" \
> electrs.toml
'';
serviceConfig = nix-bitcoin-services.defaultHardening // {