Created
May 17, 2021 09:07
-
-
Save dminuoso/938dba3f0beb94c92004f3c2be115f09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: use_nix [...] | |
# | |
# Load environment variables from `nix-shell`. | |
# If you have a `default.nix` or `shell.nix` these will be | |
# used by default, but you can also specify packages directly | |
# (e.g `use nix -p ocaml`). | |
# | |
use_nix() { | |
direnv_load nix-shell --show-trace "$@" --run "$(join_args "$direnv" dump)" | |
if [[ $# == 0 ]]; then | |
watch_file default.nix shell.nix | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment