From 132d74c10f1fdc50d89a9b733efa39003d4aa6eb Mon Sep 17 00:00:00 2001 From: notohh Date: Fri, 24 Nov 2023 10:31:22 -0500 Subject: [PATCH] postgres: switch to ensureDBOwnership --- hosts/arashi/services/postgresql.nix | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/hosts/arashi/services/postgresql.nix b/hosts/arashi/services/postgresql.nix index 9dafe60..76f235a 100644 --- a/hosts/arashi/services/postgresql.nix +++ b/hosts/arashi/services/postgresql.nix @@ -20,31 +20,25 @@ host all all all trust ''; ensureUsers = [ - { - name = "postgres"; - ensurePermissions = { - "ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES"; - }; - } { name = "hedgedoc"; - ensurePermissions."DATABASE hedgedoc" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } { name = "forgejo"; - ensurePermissions."DATABASE forgejo" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } { name = "grafana"; - ensurePermissions."DATABASE grafana" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } { name = "authelia"; - ensurePermissions."DATABASE authelia" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } { name = "vaultwarden"; - ensurePermissions."DATABASE vaultwarden" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } ]; ensureDatabases = [