Skip to content

Commit

Permalink
switch grafana to postgres backing
Browse files Browse the repository at this point in the history
  • Loading branch information
devusb committed Jan 29, 2024
1 parent 9ec0d1f commit 2a74800
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hosts/chopper/monitoring.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ let
};
in
{
services.postgresql = {
enable = true;
ensureUsers = [{
name = "grafana";
ensureDBOwnership = true;
}];
ensureDatabases = [ "grafana" ];
};
services.grafana = {
enable = true;
settings = {
Expand All @@ -18,6 +26,11 @@ in
socket = "/run/grafana/grafana.sock";
socket_mode = "0666";
};
database = {
type = "postgres";
user = "grafana";
host = "/run/postgresql";
};
users = {
allow_sign_up = false;
auto_assign_org = true;
Expand Down

0 comments on commit 2a74800

Please sign in to comment.