nixos/prometheus-minio-exporter: only inherit keys from minio if set
This commit is contained in:
parent
8e10a4d862
commit
e7e4e0c3b6
@ -37,26 +37,30 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
minioAccessKey = mkOption {
|
minioAccessKey = mkOption ({
|
||||||
type = types.str;
|
type = types.str;
|
||||||
example = "BKIKJAA5BMMU2RHO6IBB";
|
example = "BKIKJAA5BMMU2RHO6IBB";
|
||||||
default = if config.services.minio.enable then config.services.minio.accessKey else null;
|
|
||||||
description = ''
|
description = ''
|
||||||
The value of the Minio access key.
|
The value of the Minio access key.
|
||||||
It is required in order to connect to the server.
|
It is required in order to connect to the server.
|
||||||
By default this uses the one from the local minio server if enabled.
|
By default this uses the one from the local minio server if enabled
|
||||||
|
and <literal>config.services.minio.accessKey</literal>.
|
||||||
'';
|
'';
|
||||||
};
|
} // optionalAttrs (config.services.minio.enable && config.services.minio.accessKey != "") {
|
||||||
|
default = config.services.minio.accessKey;
|
||||||
|
});
|
||||||
|
|
||||||
minioAccessSecret = mkOption {
|
minioAccessSecret = mkOption ({
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = if config.services.minio.enable then config.services.minio.secretKey else null;
|
|
||||||
description = ''
|
description = ''
|
||||||
The calue of the Minio access secret.
|
The calue of the Minio access secret.
|
||||||
It is required in order to connect to the server.
|
It is required in order to connect to the server.
|
||||||
By default this uses the one from the local minio server if enabled.
|
By default this uses the one from the local minio server if enabled
|
||||||
|
and <literal>config.services.minio.secretKey</literal>.
|
||||||
'';
|
'';
|
||||||
};
|
} // optionalAttrs (config.services.minio.enable && config.services.minio.secretKey != "") {
|
||||||
|
default = config.services.minio.secretKey;
|
||||||
|
});
|
||||||
|
|
||||||
minioBucketStats = mkOption {
|
minioBucketStats = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user