From 0c3d8e2a3977fb1883a3ff1521bd88966d800b95 Mon Sep 17 00:00:00 2001 From: Tim McCarthy Date: Fri, 26 Aug 2022 11:52:46 -0700 Subject: [PATCH] Switch to human readable direnv caches --- nix/home.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/home.nix b/nix/home.nix index 5f56ed8..cc14383 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -55,8 +55,8 @@ declare -A direnv_layout_dirs direnv_layout_dir() { echo "''${direnv_layout_dirs[$PWD]:=$( - echo -n "$XDG_CACHE_HOME"/direnv/layouts/ - echo -n "$PWD" | sha1sum | cut -d ' ' -f 1 + local path="''${PWD//[^a-zA-Z0-9]/-}" + echo "$XDG_CACHE_HOME/direnv/layouts/''${path:1}" )}" } '';