anchor.diff:  with lib;
   
   let
  -  cfg = config.services.bitcoind;
  -  pidFile = "${cfg.dataDir}/bitcoind.pid";
  -  configFile = pkgs.writeText "bitcoin.conf" ''
  -    ${optionalString cfg.testnet "testnet=1"}
  -    ${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"}
  -    ${optionalString (cfg.prune != null) "prune=${toString cfg.prune}"}
  -
  -    # Connection options
  -    ${optionalString (cfg.port != null) "port=${toString cfg.port}"}
  -
  -    # RPC server options
  -    ${optionalString (cfg.rpc.port != null) "rpcport=${toString cfg.rpc.port}"}
  -    ${concatMapStringsSep  "\n"
  -      (rpcUser: "rpcauth=${rpcUser.name}:${rpcUser.passwordHMAC}")
  -      (attrValues cfg.rpc.users)
  -    }
  -
  -    # Extra config options (from bitcoind nixos service)
  -    ${cfg.extraConfig}
  -  '';
  -  cmdlineOptions = escapeShellArgs [
  -    "-conf=${cfg.configFile}"
  -    "-datadir=${cfg.dataDir}"
  -    "-pid=${pidFile}"
  -  ];
  +
  +  eachBitcoind = config.services.bitcoind;
   
     rpcUserOpts = { name, ... }: {
       options = {
  
positive.code:               bob.passwordHMAC = "b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99";
              }
            '';
            type = with types; loaOf (submodule rpcUserOpts);
            description = ''
              RPC user information for JSON-RPC connnections.
            '';
          };
        };
  
        testnet = mkOption {
          type = types.bool;
          default = false;
          description = "Whether to use the test chain.";
        };
        port = mkOption {
          type = types.nullOr types.port;
          default = null;
          description = "Override the default port on which to listen for connections.";
        };
        dbCache = mkOption {
          type = types.nullOr (types.ints.between 4 16384);
          default = null;
          example = 4000;
          description = "Override the default database cache size in megabytes.";
        };
        prune = mkOption {
          type = types.nullOr (types.coercedTo
            (types.enum [ "disable" "manual" ])
  
negative.code:         description = ''
            Password HMAC-SHA-256 for JSON-RPC connections. Must be a string of the
            format &lt;SALT-HEX&gt;$&lt;HMAC-HEX&gt;.
  
            Tool (Python script) for HMAC generation is available here:
            <link xlink:href="https://github.com/bitcoin/bitcoin/blob/master/share/rpcauth/rpcauth.py"/>
          '';
        };
      };
  