pub-solar-os/users/profiles/direnv/default.nix
Timothy DeHerrera 70723403cc
direnv: flake based envs are pure by default
We should reflect this in the IN_NIX_SHELL envar, since it doesn't
get set properly otherwise.
2020-12-19 17:49:18 -07:00

15 lines
316 B
Nix

{
programs.direnv = {
enable = true;
stdlib = ''
use_flake() {
mkdir -p $(direnv_layout_dir)
watch_file flake.nix
watch_file flake.lock
eval "$(nix print-dev-env --profile "$(direnv_layout_dir)/flake-profile")" \
&& IN_NIX_SHELL="pure"
}
'';
};
}