git-bug/.envrc
sudoforge bf753031d0 feat: add initial nix development shell
This change bootstraps the configuration of a development shell via nix.

Change-Id: Ic171e7599b50bb29ecc07d9c4534bcbc117f2299
2024-07-20 16:45:55 -07:00

21 lines
753 B
Plaintext

# this is required for versions of direnv older than 2.29.0, since they do not
# support `use flake`, and is recommended in all cases, since it caches the
# environment and prevents dependencies from being garbage-collected by nix.
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
source_url \
"https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" \
"sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
fi
# allow extending this .envrc with a user-defined .envrc.local
source_env_if_exists .envrc.local
# load the development shell defined in the flake.nix file
# note: this automatically watches the following files:
# - flake.nix
# - flake.lock
use flake
# files to watch
watch_file .envrc.local