anchor.diff:  
     configFile = pkgs.writeText "statsd.conf" ''
       {
  -      host: "${cfg.host}",
  +      address: "${cfg.host}",
         port: "${toString cfg.port}",
         mgmt_address: "${cfg.mgmt_address}",
         mgmt_port: "${toString cfg.mgmt_port}",
  -      backends: [${concatMapStrings (el: ''"./backends/${el}",'') cfg.backends}],
  -      graphiteHost: "${cfg.graphiteHost}",
  -      graphitePort: "${toString cfg.graphitePort}",
  +      backends: [${concatMapStringsSep "," (el: if (nixType el) == "string" then ''"./backends/${el}"'' else ''"${head el.names}"'') cfg.backends}],
  +      ${optionalString (cfg.graphiteHost!=null) ''graphiteHost: "${cfg.graphiteHost}",''}
  +      ${optionalString (cfg.graphitePort!=null) ''graphitePort: "${toString cfg.graphitePort}",''}
  +      console: {
  +        prettyprint: false
  +      },
  +      log: {
  +        backend: "syslog"
  +      },
  +      automaticConfigReload: false${optionalString (cfg.extraConfig != null) ","}
         ${cfg.extraConfig}
       }
     '';
  
positive.code:     systemd.services.statsd = {
        description = "Statsd Server";
        wantedBy = [ "multi-user.target" ];
        serviceConfig = {
          ExecStart = "${pkgs.nodePackages.statsd}/bin/statsd ${configFile}";
          User = "statsd";
  
negative.code:     backends = mkOption {
        description = "List of backends statsd will use for data persistance";
        default = ["graphite"];
        example = ["graphite" pkgs.nodePackages."statsd-influxdb-backend"];
        type = types.listOf (types.either types.str types.package);
      };
  
      graphiteHost = mkOption {
        description = "Hostname or IP of Graphite server";
        default = null;
        type = types.nullOr types.str;
      };
  
      graphitePort = mkOption {
        description = "Port of Graphite server (i.e. carbon-cache).";
        default = null;
        type = types.nullOr types.int;
      };
  
      extraConfig = mkOption {
        description = "Extra configuration options for statsd";
        default = "";
        type = types.nullOr types.str;
      };
  
    };
  