anchor.diff:          '';
         };
   
  +      dataDir = mkOption {
  +        type = types.nullOr types.path;
  +        default = null;
  +        description = ''
  +          Directory to store Prometheus metrics data.
  +          This option is deprecated, please use <option>services.prometheus.stateDir</option>.
  +        '';
  +      };
  +
  +      stateDir = mkOption {
  +        type = types.nullOr types.str;
  +        default = null;
  +        description = ''
  +          Directory below <literal>${stateDirBase}</literal> to store Prometheus metrics data.
  +          This directory will be created automatically using systemd's StateDirectory mechanism.
  +          Defaults to <literal>prometheus</literal>.
  +        '';
  +      };
  +
         extraFlags = mkOption {
           type = types.listOf types.str;
           default = [];
  
positive.code:     in prom2toolCheck "check config" "prometheus.yml" yml;
  
    cmdlineArgs2 = cfg2.extraFlags ++ [
      "--storage.tsdb.path=/var/lib/prometheus2/data/"
      "--config.file=${prometheus2Yml}"
      "--web.listen-address=${cfg2.listenAddress}"
      "--alertmanager.notification-queue-capacity=${toString cfg2.alertmanagerNotificationQueueCapacity}"
  
negative.code:         default = "0.0.0.0:9090";
          description = ''
            Address to listen on for the web interface, API, and telemetry.
          '';
        };
  
        stateDir = mkOption {
          type = types.str;
          default = "prometheus2";
          description = ''
            Directory below <literal>${stateDirBase}</literal> to store Prometheus metrics data.
            This directory will be created automatically using systemd's StateDirectory mechanism.
            Defaults to <literal>prometheus2</literal>.
          '';
        };
  
  