Skip to content

Commit

Permalink
fix loading Nix Flake shell via direnv
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <[email protected]>
  • Loading branch information
jakubgs committed Jan 2, 2025
1 parent 225554a commit fbf913e
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
NBS_ONLY_LOAD_ENV_VARS=1 source env.sh

if command -v nix > /dev/null
then
export NIMBUS_NIX_ENV=1

cd installer/nix
# watch_file tells direnv that changes to any of the watched files
# should trigger a re-evalution of the environment
watch_file flake.nix
watch_file flake.lock
watch_file shell.nix

mkdir -p .flake-profiles
eval "$(nix print-dev-env --profile ".flake-profiles/profile")"
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
fi
use flake

0 comments on commit fbf913e

Please sign in to comment.