Merge pull request #272564 from SuperSandro2000/grafana

nixos/grafana: create plugins directory in provisioning, fix deprecation warning
This commit is contained in:
Maximilian Bosch 2023-12-09 13:51:55 +01:00 committed by GitHub
commit 06216a9168
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ let
fi
'';
provisionConfDir = pkgs.runCommand "grafana-provisioning" { nativeBuildInputs = [ pkgs.xorg.lndir ]; } ''
mkdir -p $out/{datasources,dashboards,notifiers,alerting}
mkdir -p $out/{alerting,datasources,dashboards,notifiers,plugins}
${ln { src = datasourceFileOrDir; dir = "datasources"; filename = "datasource"; }}
${ln { src = dashboardFileOrDir; dir = "dashboards"; filename = "dashboard"; }}
${ln { src = notifierFileOrDir; dir = "notifiers"; filename = "notifier"; }}
@ -1831,7 +1831,7 @@ in
set -o errexit -o pipefail -o nounset -o errtrace
shopt -s inherit_errexit
exec ${cfg.package}/bin/grafana-server -homepath ${cfg.dataDir} -config ${configFile}
exec ${cfg.package}/bin/grafana server -homepath ${cfg.dataDir} -config ${configFile}
'';
serviceConfig = {
WorkingDirectory = cfg.dataDir;