From 75c0482e85732644dcb0ebd6b0e7ba5eac39cdff Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Mon, 18 Dec 2023 14:50:33 -0700 Subject: [PATCH] integration-tests/basic: Fix Postgres permissions See also https://github.com/NixOS/nixpkgs/pull/266270. --- integration-tests/basic/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/integration-tests/basic/default.nix b/integration-tests/basic/default.nix index ac26d52..7e29e77 100644 --- a/integration-tests/basic/default.nix +++ b/integration-tests/basic/default.nix @@ -49,9 +49,6 @@ let ensureUsers = [ { name = "atticd"; - ensurePermissions = { - "DATABASE attic" = "ALL PRIVILEGES"; - }; } # For testing only - Don't actually do this @@ -64,6 +61,10 @@ let ]; }; + systemd.services.postgresql.postStart = lib.mkAfter '' + $PSQL -tAc 'ALTER DATABASE "attic" OWNER TO "atticd"' + ''; + services.atticd.settings = { database.url = "postgresql:///attic?host=/run/postgresql"; };