forked from mirrors/nixpkgs
nixos/grafana: add socket configuration option
This commit is contained in:
parent
5bf0e509b5
commit
c162597465
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue