19 lines
416 B
Nix
19 lines
416 B
Nix
{
|
|
config,
|
|
service_configs,
|
|
lib,
|
|
...
|
|
}:
|
|
lib.mkIf (config.services.grafana.enable && config.services.llama-cpp.enable) (
|
|
lib.mkGrafanaAnnotationService {
|
|
name = "llama-cpp";
|
|
description = "LLM request annotation service for Grafana";
|
|
script = ./llama-cpp-annotations.py;
|
|
after = [ "llama-cpp.service" ];
|
|
environment = {
|
|
POLL_INTERVAL = "5";
|
|
CPU_THRESHOLD = "50";
|
|
};
|
|
}
|
|
)
|