opentsdb nixos module: Add option for defining OpenTSDB's configuration

+12 -4
+12 -4
nixos/modules/services/databases/opentsdb.nix
··· 5 5 let 6 6 cfg = config.services.opentsdb; 7 7 8 - configFile = pkgs.writeText "opentsdb.conf" '' 9 - tsd.core.auto_create_metrics = true 10 - tsd.http.request.enable_chunked = true 11 - ''; 8 + configFile = pkgs.writeText "opentsdb.conf" cfg.config; 12 9 13 10 in { 14 11 ··· 56 53 default = 4242; 57 54 description = '' 58 55 Which port OpenTSDB listens on. 56 + ''; 57 + }; 58 + 59 + config = mkOption { 60 + type = types.lines; 61 + default = '' 62 + tsd.core.auto_create_metrics = true 63 + tsd.http.request.enable_chunked = true 64 + ''; 65 + description = '' 66 + The contents of OpenTSDB's configuration file 59 67 ''; 60 68 }; 61 69