nixos-config/pkgs/grafana-dashboards/nginx.nix

38 lines
725 B
Nix
Raw Permalink Normal View History

2022-04-10 11:54:58 +02:00
{
stdenv,
fetchFromGitHub,
lib,
...
}: let
inherit
(lib)
2022-01-11 16:08:21 +01:00
licenses
2022-04-10 11:54:58 +02:00
;
2022-01-11 16:08:21 +01:00
version = "0.9.0";
in
2022-04-10 11:54:58 +02:00
stdenv.mkDerivation {
inherit version;
pname = "grafana-dashboard-nginx";
2022-04-10 11:54:58 +02:00
dontBuild = true;
2022-04-10 11:54:58 +02:00
src = fetchFromGitHub {
owner = "nginxinc";
repo = "nginx-prometheus-exporter";
rev = "v${version}";
sha256 = "sha256:04y5vpj2kv2ygdzxy3crpnx4mhpkm1ns2995kxgvjlhnyck7a5rf";
};
2022-04-10 11:54:58 +02:00
installPhase = ''
mkdir -p $out
cp grafana/dashboard.json $out/dashboard.json
'';
2022-04-10 11:54:58 +02:00
meta = {
description = "grafana dashboard for NGINX exporter";
homepage = "https://github.com/nginxinc/nginx-prometheus-exporter";
license = licenses.asl20;
};
}