fix
This commit is contained in:
parent
1525aacc48
commit
6b6f2af918
|
@ -6,19 +6,16 @@ let
|
|||
text = cfg.prometheusCa;
|
||||
};
|
||||
yaml = pkgs.formats.yaml { };
|
||||
nodeWebConfig = yaml.generate "prometheus-node-exporter-webconfig.yml" (lib.mkMerge [
|
||||
({
|
||||
nodeWebConfig = yaml.generate "prometheus-node-exporter-webconfig.yml" {
|
||||
tls_server_config = {
|
||||
client_ca_file = prometheusCaFile;
|
||||
cert_file = cfg.prometheusNodeExporterCertFile;
|
||||
key_file = cfg.prometheusNodeExporterCertKeyFile;
|
||||
client_auth_type = "RequireAndVerifyClientCert";
|
||||
};
|
||||
})
|
||||
(lib.mkIf (cfg.prometheusNodeExporterAllowScrapperSans != null) {
|
||||
tls_server_config.client_allowed_sans = cfg.prometheusNodeExporterAllowScrapperSans;
|
||||
})
|
||||
]);
|
||||
} // (if (cfg.prometheusNodeExporterAllowScrapperSans != null) then {
|
||||
client_allowed_sans = cfg.prometheusNodeExporterAllowScrapperSans;
|
||||
} else {});
|
||||
};
|
||||
in {
|
||||
options.services.ppNodeExporter = {
|
||||
prometheusCa = lib.mkOption {
|
||||
|
|
Loading…
Reference in a new issue