Merge pull request #117941 from em0lar/grafana-module-socket
nixos/grafana: add socket configuration option
This commit is contained in:
commit
e58bd1763e
1 changed files with 9 additions and 0 deletions
|
@ -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