anchor.diff:  
     configFile = pkgs.writeText "hbase-site.xml"
       ''<configuration>
  -        ${buildProperty (defaultConfig // cfg.settings)}
  +        ${buildProperty (opt.settings.default // cfg.settings)}
         </configuration>
       '';
   
  
positive.code: { config, lib, pkgs, ... }:
  
  with lib;
  
  let
    cfg = config.services.hbase;
  
    defaultConfig = {
      "hbase.rootdir" = "file://${cfg.dataDir}/hbase";
      "hbase.zookeeper.property.dataDir" = "${cfg.dataDir}/zookeeper";
    };
  
    buildProperty = configAttr:
      (builtins.concatStringsSep "\n"
  
negative.code: 
        settings = mkOption {
          type = with lib.types; attrsOf (oneOf [ str int bool ]);
          default = {
            "hbase.rootdir" = "file://${cfg.dataDir}/hbase";
            "hbase.zookeeper.property.dataDir" = "${cfg.dataDir}/zookeeper";
          };
          defaultText = literalExpression ''
            {
              "hbase.rootdir" = "file://''${config.${opt.dataDir}}/hbase";
              "hbase.zookeeper.property.dataDir" = "''${config.${opt.dataDir}}/zookeeper";
            }
          '';
          description = ''
            configurations in hbase-site.xml, see <link xlink:href="https://github.com/apache/hbase/blob/master/hbase-server/src/test/resources/hbase-site.xml"/> for details.
          '';
  