grafana: 5.0.2 -> 5.0.3, fix headless phantomjs
This commit is contained in:
parent
6f04eec460
commit
ca7b29050f
@ -25,6 +25,7 @@ let
|
|||||||
DATABASE_USER = cfg.database.user;
|
DATABASE_USER = cfg.database.user;
|
||||||
DATABASE_PASSWORD = cfg.database.password;
|
DATABASE_PASSWORD = cfg.database.password;
|
||||||
DATABASE_PATH = cfg.database.path;
|
DATABASE_PATH = cfg.database.path;
|
||||||
|
DATABASE_CONN_MAX_LIFETIME = cfg.database.connMaxLifetime;
|
||||||
|
|
||||||
SECURITY_ADMIN_USER = cfg.security.adminUser;
|
SECURITY_ADMIN_USER = cfg.security.adminUser;
|
||||||
SECURITY_ADMIN_PASSWORD = cfg.security.adminPassword;
|
SECURITY_ADMIN_PASSWORD = cfg.security.adminPassword;
|
||||||
@ -143,6 +144,15 @@ in {
|
|||||||
default = "${cfg.dataDir}/data/grafana.db";
|
default = "${cfg.dataDir}/data/grafana.db";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
connMaxLifetime = mkOption {
|
||||||
|
description = ''
|
||||||
|
Sets the maximum amount of time (in seconds) a connection may be reused.
|
||||||
|
For MySQL this setting should be shorter than the `wait_timeout' variable.
|
||||||
|
'';
|
||||||
|
default = 14400;
|
||||||
|
type = types.int;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
@ -241,7 +251,9 @@ in {
|
|||||||
description = "Grafana Service Daemon";
|
description = "Grafana Service Daemon";
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
after = ["networking.target"];
|
after = ["networking.target"];
|
||||||
environment = mapAttrs' (n: v: nameValuePair "GF_${n}" (toString v)) envOptions;
|
environment = {
|
||||||
|
QT_QPA_PLATFORM = "offscreen";
|
||||||
|
} // mapAttrs' (n: v: nameValuePair "GF_${n}" (toString v)) envOptions;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package.bin}/bin/grafana-server -homepath ${cfg.dataDir}";
|
ExecStart = "${cfg.package.bin}/bin/grafana-server -homepath ${cfg.dataDir}";
|
||||||
WorkingDirectory = cfg.dataDir;
|
WorkingDirectory = cfg.dataDir;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomjs2 }:
|
{ lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomjs2 }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
version = "5.0.2";
|
version = "5.0.3";
|
||||||
name = "grafana-${version}";
|
name = "grafana-${version}";
|
||||||
goPackagePath = "github.com/grafana/grafana";
|
goPackagePath = "github.com/grafana/grafana";
|
||||||
|
|
||||||
@ -9,12 +9,12 @@ buildGoPackage rec {
|
|||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
owner = "grafana";
|
owner = "grafana";
|
||||||
repo = "grafana";
|
repo = "grafana";
|
||||||
sha256 = "0lwv6k8yp1jpp3ghizvrnnb5zpnsbkyd1i9ggy4gbs68mg8xzp19";
|
sha256 = "0508dvkanrfrvdnddjsaz8qm3qbgavznia5hqr8zx3qvq4789hj2";
|
||||||
};
|
};
|
||||||
|
|
||||||
srcStatic = fetchurl {
|
srcStatic = fetchurl {
|
||||||
url = "https://grafana-releases.s3.amazonaws.com/release/grafana-${version}.linux-x64.tar.gz";
|
url = "https://grafana-releases.s3.amazonaws.com/release/grafana-${version}.linux-x64.tar.gz";
|
||||||
sha256 = "06qqi5v9s9ni4a380alsc3f53hvmmypqgm3cc25hl3ld5w3zdlkd";
|
sha256 = "0dzb93vx72sm6iri6c96k3a15zn8mp26pd2r78m6k3nhg8rsrqmm";
|
||||||
};
|
};
|
||||||
|
|
||||||
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
|
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
|
||||||
|
Loading…
Reference in New Issue
Block a user