-
Notifications
You must be signed in to change notification settings - Fork 0
/
direnvrc
43 lines (35 loc) · 1.42 KB
/
direnvrc
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
37
38
39
40
41
42
43
# shellcheck shell=bash
strict_env
if [ -n "${CI:-}" ]; then
log_status "CI environment variable set, skipping"
else
ready=true
if has fdesetup && [ "$(fdesetup isactive)" != true ]; then
log_error FileVault encryption not active
cat <<EOM
You must have FileVault's full-disk encryption active before downloading secret credentials to your computer. Read this guide to learn how to enable FileVault: https://support.apple.com/en-us/HT204837.
Thank you for helping keep Expo secure.
EOM
ready=false
fi
# These are the lines the nix installer would normally add to people's shell
# profiles. If people install nix without making changes to their profiles,
# the nix cli won't be present in their PATH until we do this.
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
unstrict_env . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
if has nix; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/0357fa09ff68323c472fc0362ddc141a6aa6c3b5/direnvrc" "sha256-RoBVZbAvCb+XYPf2O/jqH64P+hAz55vlUz+cmFNHdDg="
nix_direnv_manual_reload
NIX_CONFIG="warn-dirty = false
experimental-features = nix-command flakes
"
export NIX_CONFIG
else
log_status "Nix installation not detected (https://nixos.org/download/)"
fi
if ! "$ready"; then
log_error "Development environment cannot be loaded. Fix errors above and run 'direnv reload' to retry."
exit 0
fi
fi