nixos/graphite: add host and port options for graphiteApi
This commit is contained in:
@@ -98,6 +98,18 @@ in {
|
|||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
host = mkOption {
|
||||||
|
description = "Graphite web service listen address.";
|
||||||
|
default = "127.0.0.1";
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
description = "Graphite api service port.";
|
||||||
|
default = 8080;
|
||||||
|
type = types.int;
|
||||||
|
};
|
||||||
|
|
||||||
extraConfig = mkOption {
|
extraConfig = mkOption {
|
||||||
description = "Extra configuration for graphite api.";
|
description = "Extra configuration for graphite api.";
|
||||||
default = ''
|
default = ''
|
||||||
@@ -320,7 +332,7 @@ in {
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.python27Packages.waitress}/bin/waitress-serve \
|
${pkgs.python27Packages.waitress}/bin/waitress-serve \
|
||||||
--host=${cfg.web.host} --port=${toString cfg.web.port} \
|
--host=${cfg.api.host} --port=${toString cfg.api.port} \
|
||||||
graphite_api.app:app
|
graphite_api.app:app
|
||||||
'';
|
'';
|
||||||
User = "graphite";
|
User = "graphite";
|
||||||
|
|||||||
Reference in New Issue
Block a user