From 397b372cf36f3f5d79dbe1f301b61437eeea0144 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Thu, 3 Feb 2022 20:46:28 +0100 Subject: [PATCH] bitcoind: improve option `rpc.users` - Move description to top - Improve example --- modules/bitcoind.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/bitcoind.nix b/modules/bitcoind.nix index ac8f913..bf59a80 100644 --- a/modules/bitcoind.nix +++ b/modules/bitcoind.nix @@ -101,9 +101,14 @@ let }; users = mkOption { default = {}; + description = '' + Allowed users for JSON-RPC connections. + ''; example = { - alice.passwordHMAC = "f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae"; - bob.passwordHMAC = "b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99"; + alice = { + passwordHMAC = "f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae"; + rpcwhitelist = [ "getnetworkinfo" "getpeerinfo" ]; + }; }; type = with types; attrsOf (submodule ({ name, ... }: { options = { @@ -138,9 +143,6 @@ let }; }; })); - description = '' - RPC user information for JSON-RPC connections. - ''; }; }; regtest = mkOption {