Skip to content

Latest commit

 

History

History

postgres

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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.

How to call?

  • mac:

    • Calling from shell.nixes project root:

      nix-shell --argstr "nixpkgs_commit" "nixpkgs-22.11-darwin" --argstr "_utils_file" "file://$(realpath _utils.nix)" postgres/postgres_shell.nix --show-trace
      

      or

      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_commit from "nixpkgs-22.11-darwin" with "22.11" (or something else that points to a commit in the Nixpkgs repo).

NOTE: The _nix-shell directory (experimental)

Just a convention to make it possible for other Nix shell expressions in this repo to get stacked. Will see how it works.