direnv: use nix-direnv instead ad hoc hack
This commit is contained in:
parent
89d7829169
commit
fde19f0117
2 changed files with 3 additions and 9 deletions
|
@ -124,6 +124,8 @@ in
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
experimental-features = nix-command flakes ca-references
|
experimental-features = nix-command flakes ca-references
|
||||||
min-free = 536870912
|
min-free = 536870912
|
||||||
|
keep-outputs = true
|
||||||
|
keep-derivations = true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
{
|
{
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
stdlib = ''
|
enableNixDirenvIntegration = true;
|
||||||
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"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue