From df03ba57e29f99dde46447b0c276f861b5b1753a Mon Sep 17 00:00:00 2001 From: ibizaman Date: Sun, 5 Nov 2023 16:34:42 -0800 Subject: [PATCH] use new postgresql module for grafana --- modules/monitoring.nix | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/modules/monitoring.nix b/modules/monitoring.nix index 853a5a8..ec48f8b 100644 --- a/modules/monitoring.nix +++ b/modules/monitoring.nix @@ -36,21 +36,12 @@ in }; config = lib.mkIf cfg.enable { - services.postgresql = { - enable = true; - ensureDatabases = [ "grafana" ]; - ensureUsers = [ - { - name = "grafana"; - ensurePermissions = { - "DATABASE grafana" = "ALL PRIVILEGES"; - }; - ensureClauses = { - "login" = true; - }; - } - ]; - }; + shb.postgresql.passwords = [ + { + username = "grafana"; + database = "grafana"; + } + ]; services.grafana = { enable = true;