]> Git — Sourcephile - julm/julm-nix.git/blob - homes/softwares/direnv.nix
home-manager: update nixpkgs to have enableFlakes in nix-direnv
[julm/julm-nix.git] / homes / softwares / direnv.nix
1 {
2 xdg.configFile."direnv/direnvrc".text = ''
3 : ''${XDG_CACHE_HOME:=$HOME/.cache}
4 declare -A direnv_layout_dirs
5 direnv_layout_dir() {
6 echo "''${direnv_layout_dirs[$PWD]:=$(
7 echo -n "$XDG_CACHE_HOME"/direnv/layouts/''${PWD##*/}-
8 echo -n "$PWD" | shasum | cut -d ' ' -f 1
9 )}"
10 }
11 '';
12 programs.direnv.nix-direnv.enable = true;
13 programs.direnv.nix-direnv.enableFlakes = true;
14 }