diff --git a/nixos/modules/services/databases/opentsdb.nix b/nixos/modules/services/databases/opentsdb.nix index 9c9738570e3f..0e73d4aca0e6 100644 --- a/nixos/modules/services/databases/opentsdb.nix +++ b/nixos/modules/services/databases/opentsdb.nix @@ -5,10 +5,7 @@ with lib; let cfg = config.services.opentsdb; - configFile = pkgs.writeText "opentsdb.conf" '' - tsd.core.auto_create_metrics = true - tsd.http.request.enable_chunked = true - ''; + configFile = pkgs.writeText "opentsdb.conf" cfg.config; in { @@ -59,6 +56,17 @@ in { ''; }; + config = mkOption { + type = types.lines; + default = '' + tsd.core.auto_create_metrics = true + tsd.http.request.enable_chunked = true + ''; + description = '' + The contents of OpenTSDB's configuration file + ''; + }; + }; };