merge harden-devshell
hot-fix: pgdata anchored to repo root, .postgres/.direnv ignored at any nesting. resolves stray backend/.postgres tracking caught during phase 1 merge.
This commit is contained in:
commit
f47ea1c73d
2 changed files with 8 additions and 4 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,9 +1,9 @@
|
||||||
# Nix devshell artefacts
|
# Nix devshell artefacts
|
||||||
/.postgres/
|
.postgres/
|
||||||
/.direnv/
|
.direnv/
|
||||||
result
|
result
|
||||||
result-*
|
result-*
|
||||||
|
|
||||||
# Process-compose state
|
# Process-compose state
|
||||||
/.pc.*
|
.pc.*
|
||||||
process-compose-*.log
|
process-compose-*.log
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,11 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export PGDATA="$PWD/.postgres"
|
# Anchor PGDATA to the repo root so subshells in subdirs
|
||||||
|
# (e.g. backend/) reuse the same cluster instead of seeding
|
||||||
|
# a stray .postgres there.
|
||||||
|
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
||||||
|
export PGDATA="$REPO_ROOT/.postgres"
|
||||||
export PGHOST="$PGDATA"
|
export PGHOST="$PGDATA"
|
||||||
export PGUSER="postgres"
|
export PGUSER="postgres"
|
||||||
export PGDATABASE="postgres"
|
export PGDATABASE="postgres"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue