Sets up a toy PostgreSQL instance. (Used the word "toy" because this is a really minimal and insecure setup; just look into shell-hook.sh.)
postgres_shell.nix depends on _utils.nix, but none of the "shellHook inserts" (i.e., shell-hook.sh and clean-up.sh) depend on it, so they can be simply added to another shell.nix.
-
mac:
-
Calling from
shell.nixesproject root:nix-shell --argstr "nixpkgs_commit" "nixpkgs-22.11-darwin" --argstr "_utils_file" "file://$(realpath _utils.nix)" postgres/postgres_shell.nix --show-traceor
source run.sh -g https://github.com/toraritte/shell.nixes/blob/main/postgres/postgres_shell.nix -
Calling remotely (once commits are pushed, that is):
source <(curl https://raw.githubusercontent.com/toraritte/shell.nixes/main/run.sh) -g https://github.com/toraritte/shell.nixes/blob/main/postgres/postgres_shell.nix
-
-
linux:
All the same, but replace
nixpkgs_commitfrom"nixpkgs-22.11-darwin"with"22.11"(or something else that points to a commit in the Nixpkgs repo).
Just a convention to make it possible for other Nix shell expressions in this repo to get stacked. Will see how it works.