# Using PostgreSQL with shell.nix I have the simplest `shell.nix` I can get away with: ```nix with import {}; mkShell { buildInputs = [ postgresql ]; } ``` If you use this, you'll end up with PostgreSQL available in your shell, but not actually running. To make it work, you can do this: ```bash # Create a database with the data stored in the current directory initdb -D .tmp/mydb # Start PostgreSQL running as the current user # and with the Unix socket in the current directory pg_ctl -D .tmp/mydb -l logfile -o "--unix_socket_directories='$PWD'" start # Create a database createdb mydb ```