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 = { settings.security = {
admin_email = "metrics@${domain}"; admin_email = "metrics@${domain}";
admin_password = "$__file{${config.age.secrets."cube/passowrd.grafana".path}}"; admin_password = "$__file{${config.age.secrets."cube/passowrd.grafana".path}}";
disable_initial_admin_creation = true; # Just in case.
}; };
}; };

View file

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