summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorPascal Bach <pascal.bach@nextrem.ch>2017-10-08 15:09:25 +0200
committerPascal Bach <pascal.bach@nextrem.ch>2017-10-08 15:09:25 +0200
commit8e10a4d86267f7b59e2ab1d614243334459678df (patch)
tree640d0976b0f5ec1ae3c0a98e7e53103acc0e485b /nixos
parentaad88ddf5bdeb25e586d4de3ef1a639d4c95f3cf (diff)
downloadnixlib-8e10a4d86267f7b59e2ab1d614243334459678df.tar
nixlib-8e10a4d86267f7b59e2ab1d614243334459678df.tar.gz
nixlib-8e10a4d86267f7b59e2ab1d614243334459678df.tar.bz2
nixlib-8e10a4d86267f7b59e2ab1d614243334459678df.tar.lz
nixlib-8e10a4d86267f7b59e2ab1d614243334459678df.tar.xz
nixlib-8e10a4d86267f7b59e2ab1d614243334459678df.tar.zst
nixlib-8e10a4d86267f7b59e2ab1d614243334459678df.zip
prometheus-minio-exporter service: default to local minio server if enabled
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/monitoring/prometheus/minio-exporter.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/prometheus/minio-exporter.nix b/nixos/modules/services/monitoring/prometheus/minio-exporter.nix
index 4b6c96d96737..bc3967f86121 100644
--- a/nixos/modules/services/monitoring/prometheus/minio-exporter.nix
+++ b/nixos/modules/services/monitoring/prometheus/minio-exporter.nix
@@ -29,26 +29,32 @@ in {
       minioAddress = mkOption {
         type = types.str;
         example = "https://10.0.0.1:9000";
+        default = if config.services.minio.enable then "http://localhost:9000" else null;
         description = ''
           The URL of the minio server.
           Use HTTPS if Minio accepts secure connections only.
+          By default this connects to the local minio server if enabled.
         '';
       };
 
       minioAccessKey = mkOption {
         type = types.str;
         example = "BKIKJAA5BMMU2RHO6IBB";
+        default = if config.services.minio.enable then config.services.minio.accessKey else null;
         description = ''
           The value of the Minio access key.
           It is required in order to connect to the server.
+          By default this uses the one from the local minio server if enabled.
         '';
       };
 
       minioAccessSecret = mkOption {
         type = types.str;
+        default = if config.services.minio.enable then config.services.minio.secretKey else null;
         description = ''
           The calue of the Minio access secret.
           It is required in order to connect to the server.
+          By default this uses the one from the local minio server if enabled.
         '';
       };