dev/base: don't overwrite direnvrc (contains nix-direnv include)
Alan Pearce alan@alanpearce.eu
Sun, 28 Apr 2024 09:09:41 +0200
1 files changed, 10 insertions(+), 10 deletions(-)
M user/settings/development/base.nix → user/settings/development/base.nix
@@ -72,15 +72,15 @@ "${homeDirectory}/projects/alanpearce.eu" ]; }; }; + stdlib = '' + declare -A direnv_layout_dirs + direnv_layout_dir() { + echo "''${direnv_layout_dirs[$PWD]:=$( + local hash="$(${pkgs.coreutils}/bin/sha256sum - <<<"''${PWD}" | cut -c-7)" + local path="''${PWD//[^a-zA-Z0-9]/-}" + echo "${config.xdg.cacheHome}/direnv/layouts/''${hash}''${path}" + )}" + } + ''; }; - xdg.configFile."direnv/direnvrc".text = '' - declare -A direnv_layout_dirs - direnv_layout_dir() { - echo "''${direnv_layout_dirs[$PWD]:=$( - local hash="$(${pkgs.coreutils}/bin/sha256sum - <<<"''${PWD}" | cut -c-7)" - local path="''${PWD//[^a-zA-Z0-9]/-}" - echo "${config.xdg.cacheHome}/direnv/layouts/''${hash}''${path}" - )}" - } - ''; }