home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

direnv.nix (311B)


      1 { pkgs, ... }:
      2 
      3 {
      4   programs.direnv = {
      5     enable = true;
      6     stdlib = ''
      7       mkdir -p $HOME/.cache/direnv/layouts
      8       pwd_hash=$(echo -n $PWD | shasum | cut -d ' ' -f 1)
      9       direnv_layout_dir=$HOME/.cache/direnv/layouts/$pwd_hash
     10       source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc
     11     '';
     12   };
     13 }