anchor.diff:            and formats.
           '';
         };
  -      refresh_interval = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          Refresh interval to re-read the files.
  -        '';
  -      };
  +
  +      refresh_interval = mkDefOpt types.str "5m" ''
  +        Refresh interval to re-read the files.
  +      '';
       };
     };
   
     promTypes.relabel_config = types.submodule {
       options = {
  -      source_labels = mkOption {
  -        type = types.nullOr (types.listOf str);
  -        default = null;
  -        description = ''
  -          The source labels select values from existing labels. Their content
  -          is concatenated using the configured separator and matched against
  -          the configured regular expression.
  -        '';
  -      };
  -      separator = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          Separator placed between concatenated source label values.
  -        '';
  -      };
  -      target_label = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          Label to which the resulting value is written in a replace action.
  -          It is mandatory for replace actions.
  -        '';
  -      };
  -      regex = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          Regular expression against which the extracted value is matched.
  -        '';
  -      };
  -      replacement = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          Replacement value against which a regex replace is performed if the
  -          regular expression matches.
  -        '';
  -      };
  -      action = mkOption {
  -        type = types.nullOr (types.enum ["replace" "keep" "drop"]);
  -        default = null;
  -        description = ''
  -          Action to perform based on regex matching.
  -        '';
  -      };
  +      source_labels = mkOpt (types.listOf types.str) ''
  +        The source labels select values from existing labels. Their content
  +        is concatenated using the configured separator and matched against
  +        the configured regular expression.
  +      '';
  +
  +      separator = mkDefOpt types.str ";" ''
  +        Separator placed between concatenated source label values.
  +      '';
  +
  +      target_label = mkOpt types.str ''
  +        Label to which the resulting value is written in a replace action.
  +        It is mandatory for replace actions.
  +      '';
  +
  +      regex = mkDefOpt types.str "(.*)" ''
  +        Regular expression against which the extracted value is matched.
  +      '';
  +
  +      replacement = mkDefOpt types.str "$1" ''
  +        Replacement value against which a regex replace is performed if the
  +        regular expression matches.
  +      '';
  +
  +      action = mkDefOpt (types.enum ["replace" "keep" "drop"]) "replace" ''
  +        Action to perform based on regex matching.
  +      '';
  +
       };
     };
   
     promTypes.tls_config = types.submodule {
       options = {
  -      ca_file = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          CA certificate to validate API server certificate with.
  -        '';
  -      };
  -      cert_file = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          Certificate file for client cert authentication to the server.
  -        '';
  -      };
  -      key_file = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          Key file for client cert authentication to the server.
  -        '';
  -      };
  -      server_name = mkOption {
  -        type = types.nullOr types.str;
  -        default = null;
  -        description = ''
  -          ServerName extension to indicate the name of the server.
  -          http://tools.ietf.org/html/rfc4366#section-3.1
  -        '';
  -      };
  -      insecure_skip_verify = mkOption {
  -        type = types.bool;
  -        default = false;
  -        description = ''
  -          Disable validation of the server certificate.
  -        '';
  -      };
  +      ca_file = mkOpt types.str ''
  +        CA certificate to validate API server certificate with.
  +      '';
  +
  +      cert_file = mkOpt types.str ''
  +        Certificate file for client cert authentication to the server.
  +      '';
  +
  +      key_file = mkOpt types.str ''
  +        Key file for client cert authentication to the server.
  +      '';
  +
  +      server_name = mkOpt types.str ''
  +        ServerName extension to indicate the name of the server.
  +        http://tools.ietf.org/html/rfc4366#section-3.1
  +      '';
  +
  +      insecure_skip_verify = mkOpt types.bool ''
  +        Disable validation of the server certificate.
  +      '';
       };
     };
   
  
positive.code:           A list of DNS SRV record names to be queried.
          '';
        };
        refresh_interval = mkOption {
          type = types.nullOr types.str;
          default = null;
          description = ''
            The time after which the provided names are refreshed.
          '';
        };
      };
    };
  
    promTypes.consul_sd_config = types.submodule {
      options = {
        server = mkOption {
          type = types.nullOr types.str;
          default = null;
          description = "Consul server to query.";
        };
        token = mkOption {
          type = types.nullOr types.str;
          description = "Consul token";
        };
        datacenter = mkOption {
          type = types.nullOr types.str;
          description = "Consul datacenter";
        };
        scheme = mkOption {
          type = types.nullOr types.str;
          description = "Consul scheme";
        };
        username = mkOption {
          type = types.nullOr types.str;
          description = "Consul username";
        };
        password = mkOption {
          type = types.nullOr types.str;
          description = "Consul password";
        };
  
        services = mkOption {
          type = types.nullOr (types.listOf types.str);
          default = null;
          description = ''
            A list of services for which targets are retrieved.
          '';
        };
        tag_separator = mkOption {
          type = types.nullOr types.str;
          default = null;
          description = ''
            The string by which Consul tags are joined into the tag label.
          '';
        };
      };
    };
  
  
negative.code:       map (filterAttrsListRecursive pred) x
      else x;
  
    mkDefOpt = type : defaultStr : description : mkOpt type (description + ''
  
      Defaults to <literal>${defaultStr}</literal> in prometheus
      when set to <literal>null</literal>.
    '');
  
    mkOpt = type : description : mkOption {
      type = types.nullOr type;
      default = null;
      inherit description;
    };
  
    promTypes.globalConfig = types.submodule {
      options = {
        scrape_interval = mkDefOpt types.str "1m" ''
          How frequently to scrape targets by default.
        '';
  
        scrape_timeout = mkDefOpt types.str "10s" ''
          How long until a scrape request times out.
        '';
  
        evaluation_interval = mkDefOpt types.str "1m" ''
          How frequently to evaluate rules by default.
        '';
  
        external_labels = mkOpt (types.attrsOf types.str) ''
          The labels to add to any time series or alerts when
          communicating with external systems (federation, remote
          storage, Alertmanager).
        '';
      };
    };
  
  