Merge fort-nix/nix-bitcoin#437: bitcoind: fix error when defining passwordHMAC for RPC users

bf92d6094d bitcoind: fix error when defining passwordHMAC for RPC users (Erik Arvstedt)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK bf92d6094d

Tree-SHA512: 3a92c116c7e85cb03abad9b2d0be39c48be237da4a7ff2b6c20d27e9295da726b3de2d7e2298925b4ae20d7bbd8348529f4d2ec781fb8eda3338c9a06e9931a6
This commit is contained in:
Jonas Nick 2022-01-07 21:30:47 +00:00
commit ed42834a88
No known key found for this signature in database
GPG Key ID: 4861DBF262123605

View File

@ -318,7 +318,7 @@ let
${optionalString (cfg.rpc.threads != null) "rpcthreads=${toString cfg.rpc.threads}"}
rpcwhitelistdefault=0
${concatMapStrings (user: ''
${optionalString (!user.passwordHMACFromFile) "rpcauth=${user.name}:${passwordHMAC}"}
${optionalString (!user.passwordHMACFromFile) "rpcauth=${user.name}:${user.passwordHMAC}"}
${optionalString (user.rpcwhitelist != [])
"rpcwhitelist=${user.name}:${lib.strings.concatStringsSep "," user.rpcwhitelist}"}
'') (builtins.attrValues cfg.rpc.users)