diff --git a/nix/shell.nix b/nix/shell.nix index c9ea77c7..e4f99313 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -326,14 +326,11 @@ mkShell { mix local.hex --force --if-missing > /dev/null 2>&1 mix local.rebar --force --if-missing > /dev/null 2>&1 - # Auto-start services on first shell entry + # Auto-start services on first shell entry. + # Run in a detached subshell to prevent nix develop from waiting + # on daemonized PostgreSQL/Redis child processes. if [ ! -f "${servicesFlag}" ]; then - ${startServices}/bin/start-services - - # Run migrations if databases exist and Mix deps are available - if [ -d "deps" ] && mix ecto.migrate 2>/dev/null; then - echo "✓ Database migrations applied" - fi + ( ${startServices}/bin/start-services