git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #56017 from elohmeier/prom-tls
08b277eBas van Dijk
nixos/modules/services/monitoring/prometheus/default.nix+50
@@ -237,6 +237,14 @@ let
237 Optional http login credentials for metrics scraping.
237 Optional http login credentials for metrics scraping.
238 '';
238 '';
239 };
239 };
240+ tls_config = mkOption {
241+ type = types.nullOr promTypes.tls_config;
242+ default = null;
243+ apply = x: mapNullable _filter x;
244+ description = ''
245+ Configures the scrape request's TLS settings.
246+ '';
247+ };
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
431 };
439 };
432 };
440 };
433
441
442+ promTypes.tls_config = types.submodule {
443+ options = {
444+ ca_file = mkOption {
445+ type = types.nullOr types.str;
446+ default = null;
447+ description = ''
448+ CA certificate to validate API server certificate with.
449+ '';
450+ };
451+ cert_file = mkOption {
452+ type = types.nullOr types.str;
453+ default = null;
454+ description = ''
455+ Certificate file for client cert authentication to the server.
456+ '';
457+ };
458+ key_file = mkOption {
459+ type = types.nullOr types.str;
460+ default = null;
461+ description = ''
462+ Key file for client cert authentication to the server.
463+ '';
464+ };
465+ server_name = mkOption {
466+ type = types.nullOr types.str;
467+ default = null;
468+ description = ''
469+ ServerName extension to indicate the name of the server.
470+ http://tools.ietf.org/html/rfc4366#section-3.1
471+ '';
472+ };
473+ insecure_skip_verify = mkOption {
474+ type = types.bool;
475+ default = false;
476+ description = ''
477+ Disable validation of the server certificate.
478+ '';
479+ };
480+ };
481+ };
482+
483+
434in {
484in {
435 options = {
485 options = {
436 services.prometheus = {
486 services.prometheus = {