3
0
Fork 0
forked from mirrors/nixpkgs

nixos/grafana: add socket configuration option

This commit is contained in:
Leo Maroni 2021-03-29 15:59:24 +02:00
parent 5bf0e509b5
commit c162597465
No known key found for this signature in database
GPG key ID: B1ADA545CD2CBACD

View file

@ -15,6 +15,7 @@ let
SERVER_PROTOCOL = cfg.protocol;
SERVER_HTTP_ADDR = cfg.addr;
SERVER_HTTP_PORT = cfg.port;
SERVER_SOCKET = cfg.socket;
SERVER_DOMAIN = cfg.domain;
SERVER_ROOT_URL = cfg.rootUrl;
SERVER_STATIC_ROOT_PATH = cfg.staticRootPath;
@ -291,6 +292,12 @@ in {
type = types.int;
};
socket = mkOption {
description = "Listening socket.";
default = "/run/grafana/grafana.sock";
type = types.str;
};
domain = mkOption {
description = "The public facing domain name used to access grafana from a browser.";
default = "localhost";
@ -622,6 +629,8 @@ in {
serviceConfig = {
WorkingDirectory = cfg.dataDir;
User = "grafana";
RuntimeDirectory = "grafana";
RuntimeDirectoryMode = "0755";
};
preStart = ''
ln -fs ${cfg.package}/share/grafana/conf ${cfg.dataDir}