{ ... }:
{
  _class = "clan.service";
  manifest.name = "Victoria Metrics";
  manifest.description = "VictoriaMetrics: fast, cost-effective monitoring solution and time series database";
  manifest.readme = "VictoriaMetrics: fast, cost-effective monitoring solution and time series database";
  manifest.categories = [ "System" ];

  roles.default = {
    description = "a default server role";
    perInstance.nixosModule =
      {
        config,
        lib,
        ...
      }:
      {
        services.victoriametrics = {
          enable = lib.mkDefault true;
        };

        clan.core.state.victoriametrics.folders = lib.mkDefault [
          "/var/lib/${config.services.victoriametrics.stateDir}"
        ];
      };
  };
}
