From 00319bf5ee6c5afa81aafa26a55feb970a2f4317 Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Tue, 23 Jan 2024 17:36:20 -0800 Subject: [PATCH] Packaged teslamate's grafana dashboards --- .../teslamate-grafana-dashboards/default.nix | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 packages/teslamate-grafana-dashboards/default.nix diff --git a/packages/teslamate-grafana-dashboards/default.nix b/packages/teslamate-grafana-dashboards/default.nix new file mode 100644 index 0000000..2bae7dc --- /dev/null +++ b/packages/teslamate-grafana-dashboards/default.nix @@ -0,0 +1,25 @@ +{ + stdenv, + lib, + fetchFromGitHub, + ... +}: +stdenv.mkDerivation rec { + pname = "teslamate-grafana-dashboards"; + version = "1.28.2"; + + src = fetchFromGitHub { + owner = "teslamate-org"; + repo = "teslamate"; + rev = "v${version}"; + hash = "sha256-CH3u6ijzvVdjfTVu06UcyW4NhVQKeUKtC/j+UeDELNc="; + }; + + dontBuild = true; + + installPhase = '' + mkdir -p "$out" + cp "$src"/grafana/dashboards.yml "$out" + cp -r "$src"/grafana/dashboards "$out" + ''; +}