❄️ Dotfiles for our NixOS system configuration.
1{ 2 programs.direnv = { 3 enable = true; 4 silent = true; 5 6 # faster, persistent implementation of use_nix and use_flake 7 nix-direnv.enable = true; 8 9 # store direnv in cache and not per project 10 # <https://github.com/direnv/direnv/wiki/Customizing-cache-location#hashed-directories> 11 stdlib = '' 12 : ''${XDG_CACHE_HOME:=$HOME/.cache} 13 declare -A direnv_layout_dirs 14 15 direnv_layout_dir() { 16 echo "''${direnv_layout_dirs[$PWD]:=$( 17 echo -n "$XDG_CACHE_HOME"/direnv/layouts/ 18 echo -n "$PWD" | sha1sum | cut -d ' ' -f 1 19 )}" 20 } 21 ''; 22 }; 23}