Use nix-direnv instead of lorri

This commit is contained in:
Charlotte Van Petegem 2020-07-07 15:37:15 +02:00
parent 789ffd218b
commit 32ba100ee4
2 changed files with 16 additions and 7 deletions

View file

@ -3,19 +3,30 @@
{
custom.zfs.homeLinks = [
{ path = ".local/share/direnv"; type = "cache"; }
{ path = ".cache/lorri"; type = "cache"; }
{ path = ".cache/direnv"; type = "cache"; }
];
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
home-manager.users.charlotte = { ... }: {
programs.direnv = {
enable = true;
enableNixDirenvIntegration = true;
enableZshIntegration = true;
config = {
global = {
strict_env = true;
};
};
stdlib = ''
: ''${XDG_CACHE_HOME:=$HOME/.cache}
hash=$(echo -n $PWD | shasum | cut -d' ' -f 1)
direnv_layout_dir=$XDG_CACHE_HOME/direnv/layouts/"''$(echo -n $PWD | sed 's#/#-#g')/$hash"
mkdir -p "$direnv_layout_dir"
'';
};
services.lorri.enable = true;
};
}