16 lines
374 B
Nix
Raw Normal View History

2024-02-15 21:36:15 +03:00
{ pkgs, blockyUrl, prometheusUid, ... }:
let
template =
name: file: tmpl:
(pkgs.runCommandLocal name { } ''
mkdir $out
cp ${pkgs.substituteAll ({ src = file; } // tmpl)} $out/${name}.json
'');
in
pkgs.symlinkJoin {
name = "grafana-dashboards";
paths = [
(template "grafana-blocky" ./blocky.json { inherit blockyUrl prometheusUid; })
];
}