-
Notifications
You must be signed in to change notification settings - Fork 28
/
.envrc
36 lines (30 loc) · 1.18 KB
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Nix config
# if nix is installed, use it
if [ ! -r .nix-disable ] && has nix-env; then
export NIX_PROFILE="/nix/var/nix/profiles/per-user/${LOGNAME}/eng-playbook"
PATH_add ${NIX_PROFILE}/bin
nix_file=nix/default.nix
# Having NIX_SSL_CERT_FILE set means go won't use macOS keychain
# based certs
# MOST projects can leave this set, but if you are using go and
# custom certificates, you might need to futz with this
# export NIX_SSL_CERT_FILE_ORIG=$NIX_SSL_CERT_FILE
# unset NIX_SSL_CERT_FILE
nix_dir="nix"
# add the nix files so that if they change, direnv needs to be reloaded
watch_file "${nix_dir}"/*.nix
config_hash=$(nix-hash "${nix_dir}")
store_hash=$(nix-store -q --hash "${NIX_PROFILE}")
# The .nix-hash file is created by nix/update.sh
if ! grep -q "${config_hash}-${store_hash}" .nix-hash; then
log_status "WARNING: nix packages out of date. Run ${nix_dir}/update.sh"
fi
PATH_add ./node_modules/.bin
export NPM_CONFIG_PREFIX=$PWD/.npmglobal
PATH_add ./.npmglobal/bin
fi
# Load a local overrides file. Any changes you want to make for your local
if [ -e .envrc.local ]
then
source_env .envrc.local
fi