phase 2: promote services/, tests/, patches/, lib/, scripts/
This commit is contained in:
18
services/grafana/jellyfin-annotations.nix
Normal file
18
services/grafana/jellyfin-annotations.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
service_configs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
lib.mkIf (config.services.grafana.enable && config.services.jellyfin.enable) (
|
||||
lib.mkGrafanaAnnotationService {
|
||||
name = "jellyfin";
|
||||
description = "Jellyfin stream annotation service for Grafana";
|
||||
script = ./jellyfin-annotations.py;
|
||||
environment = {
|
||||
JELLYFIN_URL = "http://127.0.0.1:${toString service_configs.ports.private.jellyfin.port}";
|
||||
POLL_INTERVAL = "30";
|
||||
};
|
||||
loadCredential = "jellyfin-api-key:${config.age.secrets.jellyfin-api-key.path}";
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user