From 3e94c0d9f4673bee62922e181bb0bd795511794b Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 3 Apr 2022 18:36:20 +0200 Subject: [PATCH] chore: fix direnv auto reload --- .envrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.envrc b/.envrc index a6d5743c..c878da9a 100644 --- a/.envrc +++ b/.envrc @@ -1,2 +1,10 @@ -watch_file shell/* flake.nix -use flake || use nix +# reload when these files change +watch_file flake.nix +watch_file shell.nix + +{ + # shell gc root dir + mkdir -p "$(direnv_layout_dir)" + + eval "$(nix print-dev-env --profile $(direnv_layout_dir)/flake-profile)" +} || use nix