]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/direnv.nix
blackberry: tweak settings
[julm/julm-nix.git] / home-manager / profiles / direnv.nix
1 {
2 programs.direnv = {
3 enable = true;
4 nix-direnv.enable = true;
5 enableBashIntegration = true;
6 };
7
8 xdg.configFile."direnv/direnvrc".text = ''
9 : ''${XDG_CACHE_HOME:=$HOME/.cache}
10 declare -A direnv_layout_dirs
11 direnv_layout_dir() {
12 echo "''${direnv_layout_dirs[$PWD]:=$(
13 echo -n "$XDG_CACHE_HOME"/direnv/layouts/''${PWD##*/}-
14 echo -n "$PWD" | shasum | cut -d ' ' -f 1
15 )}"
16 }
17 '';
18 }