mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
victoriametrics: Remove module
This commit is contained in:
parent
907222c4c4
commit
3b37a4c4de
2 changed files with 0 additions and 54 deletions
|
|
@ -50,11 +50,6 @@
|
|||
enable = true;
|
||||
domain = "grafana.${privateDomain}";
|
||||
};
|
||||
|
||||
victoriametrics = {
|
||||
enable = true;
|
||||
domain = "metrics.${privateDomain}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.custom.web-services.victoriametrics;
|
||||
in
|
||||
{
|
||||
options.custom.web-services.victoriametrics = {
|
||||
enable = lib.mkEnableOption "";
|
||||
domain = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = "";
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 8428;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users = {
|
||||
users.victoriametrics = {
|
||||
isSystemUser = true;
|
||||
group = config.users.groups.victoriametrics.name;
|
||||
};
|
||||
groups.victoriametrics = { };
|
||||
};
|
||||
|
||||
systemd.services.victoriametrics.serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
User = config.users.users.victoriametrics.name;
|
||||
Group = config.users.groups.victoriametrics.name;
|
||||
};
|
||||
|
||||
services.victoriametrics = {
|
||||
enable = true;
|
||||
listenAddress = "localhost:${toString cfg.port}";
|
||||
extraOptions = [
|
||||
"-selfScrapeInterval=15s"
|
||||
"-selfScrapeJob=victoriametrics"
|
||||
"-selfScrapeInstance=${config.networking.hostName}"
|
||||
];
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
persistence.directories = [ "/var/lib/${config.services.victoriametrics.stateDir}" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue