direnv: use nix-direnv instead ad hoc hack

This commit is contained in:
Timothy DeHerrera 2020-12-25 22:09:09 -07:00
parent 89d7829169
commit fde19f0117
No known key found for this signature in database
GPG key ID: 8985725DB5B0C122
2 changed files with 3 additions and 9 deletions

View file

@ -124,6 +124,8 @@ in
extraOptions = ''
experimental-features = nix-command flakes ca-references
min-free = 536870912
keep-outputs = true
keep-derivations = true
'';
};

View file

@ -1,14 +1,6 @@
{
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"
}
'';
enableNixDirenvIntegration = true;
};
}