aboutsummaryrefslogtreecommitdiffstats
path: root/.envrc
blob: 9b41f79bc0fc46f5304272c29df16814006f05b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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