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.
This commit is contained in:
parent
e12fc523d6
commit
77a8e0ffcc
1 changed files with 2 additions and 2 deletions
|
|
@ -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 ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue