From b48d81451d84176782752bcb0631e27fb49de779 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 21 Nov 2023 00:18:29 +0100 Subject: [PATCH] nixos: services: migrate to 'ensureDBOwnership' `ensurePermissions` is deprecated, and doesn't work on PostgreSQL 15. --- modules/nixos/services/drone/server/default.nix | 4 +--- modules/nixos/services/nextcloud/default.nix | 2 +- modules/nixos/services/paperless/default.nix | 2 +- modules/nixos/services/quassel/default.nix | 2 +- modules/nixos/services/tandoor-recipes/default.nix | 2 +- modules/nixos/services/vikunja/default.nix | 2 +- modules/nixos/services/woodpecker/server/default.nix | 4 +--- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/nixos/services/drone/server/default.nix b/modules/nixos/services/drone/server/default.nix index 0f56d29..d651f85 100644 --- a/modules/nixos/services/drone/server/default.nix +++ b/modules/nixos/services/drone/server/default.nix @@ -41,9 +41,7 @@ in ensureDatabases = [ "drone" ]; ensureUsers = [{ name = "drone"; - ensurePermissions = { - "DATABASE drone" = "ALL PRIVILEGES"; - }; + ensureDBOwnership = true; }]; }; diff --git a/modules/nixos/services/nextcloud/default.nix b/modules/nixos/services/nextcloud/default.nix index 260e73e..65b7234 100644 --- a/modules/nixos/services/nextcloud/default.nix +++ b/modules/nixos/services/nextcloud/default.nix @@ -57,7 +57,7 @@ in ensureUsers = [ { name = "nextcloud"; - ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } ]; }; diff --git a/modules/nixos/services/paperless/default.nix b/modules/nixos/services/paperless/default.nix index 1ca1f66..90f6b0c 100644 --- a/modules/nixos/services/paperless/default.nix +++ b/modules/nixos/services/paperless/default.nix @@ -131,7 +131,7 @@ in ensureUsers = [ { name = "paperless"; - ensurePermissions."DATABASE paperless" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } ]; }; diff --git a/modules/nixos/services/quassel/default.nix b/modules/nixos/services/quassel/default.nix index ec686e1..695f9e0 100644 --- a/modules/nixos/services/quassel/default.nix +++ b/modules/nixos/services/quassel/default.nix @@ -39,7 +39,7 @@ in ensureUsers = [ { name = "quassel"; - ensurePermissions."DATABASE quassel" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } ]; # Insecure, I don't care. diff --git a/modules/nixos/services/tandoor-recipes/default.nix b/modules/nixos/services/tandoor-recipes/default.nix index 83177c8..541e198 100644 --- a/modules/nixos/services/tandoor-recipes/default.nix +++ b/modules/nixos/services/tandoor-recipes/default.nix @@ -65,7 +65,7 @@ in ensureUsers = [ { name = "tandoor_recipes"; - ensurePermissions."DATABASE tandoor_recipes" = "ALL PRIVILEGES"; + ensureDBOwnership = true; } ]; }; diff --git a/modules/nixos/services/vikunja/default.nix b/modules/nixos/services/vikunja/default.nix index 1cdef5f..8c051b0 100644 --- a/modules/nixos/services/vikunja/default.nix +++ b/modules/nixos/services/vikunja/default.nix @@ -109,7 +109,7 @@ in ensureUsers = [ { name = "vikunja"; - ensurePermissions = { "DATABASE vikunja" = "ALL PRIVILEGES"; }; + ensureDBOwnership = true; } ]; }; diff --git a/modules/nixos/services/woodpecker/server/default.nix b/modules/nixos/services/woodpecker/server/default.nix index d9f723b..cebbc9b 100644 --- a/modules/nixos/services/woodpecker/server/default.nix +++ b/modules/nixos/services/woodpecker/server/default.nix @@ -48,9 +48,7 @@ in ensureDatabases = [ "woodpecker" ]; ensureUsers = [{ name = "woodpecker"; - ensurePermissions = { - "DATABASE woodpecker" = "ALL PRIVILEGES"; - }; + ensureDBOwnership = true; }]; };