1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Add deleteDatasources so we dont end up having duplicates

This commit is contained in:
RGBCube 2024-01-15 10:47:31 +03:00
parent 3da95ae0bc
commit de58ab8507
No known key found for this signature in database
2 changed files with 13 additions and 5 deletions

View file

@ -30,6 +30,8 @@ in serverSystemConfiguration {
settings.security = {
admin_email = "metrics@${domain}";
admin_password = "$__file{${config.age.secrets."cube/passowrd.grafana".path}}";
disable_initial_admin_creation = true; # Just in case.
};
};

View file

@ -1,12 +1,18 @@
{ config, ulib, ... }: with ulib;
serverSystemConfiguration {
services.grafana.provision.datasources.settings.datasources = [{
services.grafana.provision.datasources.settings = {
datasources = [{
name = "Prometheus";
type = "prometheus";
url = "http://[::]:${toString config.services.prometheus.port}";
}];
deleteDatasources = [{
name = "Prometheus";
}];
};
services.prometheus = enabled {
port = 9000;
retentionTime = "1w";