Disable direnv delay warning

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-01-15 11:07:55 +00:00
parent 6b366fc24a
commit ece246937d
2 changed files with 21 additions and 12 deletions

View File

@@ -4,6 +4,7 @@
}:
{
lib,
pkgs,
inputs,
system,
...
@@ -59,17 +60,25 @@
};
# https://github.com/direnv/direnv/wiki/Customizing-cache-location
xdg.configFile."direnv/direnvrc".text = ''
declare -A direnv_layout_dirs
direnv_layout_dir() {
local hash path
echo "''${direnv_layout_dirs[$PWD]:=$(
hash="$(sha1sum - <<< "$PWD" | head -c40)"
path="''${PWD//[^a-zA-Z0-9]/-}"
echo "${home}/.cache/direnv/layouts/''${hash}''${path}"
)}"
}
'';
xdg.configFile = {
"direnv/direnvrc".text = ''
declare -A direnv_layout_dirs
direnv_layout_dir() {
local hash path
echo "''${direnv_layout_dirs[$PWD]:=$(
hash="$(sha1sum - <<< "$PWD" | head -c40)"
path="''${PWD//[^a-zA-Z0-9]/-}"
echo "${home}/.cache/direnv/layouts/''${hash}''${path}"
)}"
}
'';
"direnv/direnv.toml".source = (
(pkgs.formats.toml { }).generate "direnv.toml" {
global.warn_timeout = 0;
}
);
};
};
environment.persistence = {