modules: services: monitoring: add 'secretKeyFile'
All checks were successful
ci/woodpecker/push/check Pipeline was successful

This commit is contained in:
Bruno BELANYI 2023-07-17 10:58:29 +00:00
parent ae13ab0c86
commit 47533f119e
2 changed files with 8 additions and 0 deletions

View file

@ -80,6 +80,7 @@ in
enable = true;
grafana = {
passwordFile = secrets."monitoring/password".path;
secretKeyFile = secrets."monitoring/secret-key".path;
};
};
# FLOSS music streaming server

View file

@ -27,6 +27,12 @@ in
example = "/var/lib/grafana/password.txt";
description = "Admin password stored in a file";
};
secretKeyFile = mkOption {
type = types.str;
example = "/var/lib/grafana/secret_key.txt";
description = "Secret key stored in a file";
};
};
prometheus = {
@ -61,6 +67,7 @@ in
security = {
admin_user = cfg.grafana.username;
admin_password = "$__file{${cfg.grafana.passwordFile}}";
secret_key = "$__file{${cfg.grafana.secretKeyFile}}";
};
};