From 77a8e0ffccf86020212b152ea42895b5fd1fd2a7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 25 Mar 2026 10:31:51 +0100 Subject: [PATCH] fix(attic): specify PostgreSQL database for postStart script - Update `psql` command in the `postStart` script to explicitly connect to the `postgres` database before altering ownership of the `attic` database. - Ensures the command runs without issues in environments with restricted default database access. --- systems/x86_64-linux/attic/atticd.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systems/x86_64-linux/attic/atticd.nix b/systems/x86_64-linux/attic/atticd.nix index 07bacac..6ba5e4c 100644 --- a/systems/x86_64-linux/attic/atticd.nix +++ b/systems/x86_64-linux/attic/atticd.nix @@ -8,11 +8,11 @@ services.postgresql = { enable = true; ensureDatabases = [ "attic" ]; - ensureUsers = [ { name = "atticd"; } ]; + ensureUsers = [{ name = "atticd"; }]; }; systemd.services.postgresql.postStart = lib.mkAfter '' - psql -tAc 'ALTER DATABASE "attic" OWNER TO "atticd"' + psql -d postgres -tAc 'ALTER DATABASE "attic" OWNER TO "atticd"' ''; environment.systemPackages = with pkgs; [ attic-client ];