@@ -237,6 +237,14 @@ let
237 Optional http login credentials for metrics scraping.
237 Optional http login credentials for metrics scraping.
240+ tls_config = mkOption {
241+ type = types.nullOr promTypes.tls_config;
243+ apply = x: mapNullable _filter x;
245+ Configures the scrape request's TLS settings.
240 dns_sd_configs = mkOption {
248 dns_sd_configs = mkOption {
241 type = types.listOf promTypes.dns_sd_config;
249 type = types.listOf promTypes.dns_sd_config;
242 default = [];
250 default = [];
@@ -431,6 +439,48 @@ let
442+ promTypes.tls_config = types.submodule {
444+ ca_file = mkOption {
445+ type = types.nullOr types.str;
448+ CA certificate to validate API server certificate with.
451+ cert_file = mkOption {
452+ type = types.nullOr types.str;
455+ Certificate file for client cert authentication to the server.
458+ key_file = mkOption {
459+ type = types.nullOr types.str;
462+ Key file for client cert authentication to the server.
465+ server_name = mkOption {
466+ type = types.nullOr types.str;
469+ ServerName extension to indicate the name of the server.
470+ http://tools.ietf.org/html/rfc4366#section-3.1
473+ insecure_skip_verify = mkOption {
477+ Disable validation of the server certificate.
435 options = {
485 options = {
436 services.prometheus = {
486 services.prometheus = {