flakes/modules/user/direnv.nix
LavaDesu 3a5115c86a
user/direnv: clear cache on activation
also changed the layout name to be a bit easier to find if need be
2021-11-28 20:49:55 +07:00

16 lines
480 B
Nix

{ config, lib, ... }: {
programs.direnv = {
enable = true;
nix-direnv = {
enable = true;
};
};
programs.git.extraConfig.core.excludesFile = ".envrc";
# We can't use .source since hm manages this file too
xdg.configFile."direnv/direnvrc".text = builtins.readFile ../../res/direnvrc;
home.activation = {
direnvClearCache = lib.hm.dag.entryAfter ["writeBoundary"] ''
$DRY_RUN_CMD rm -rf $VERBOSE_ARG $HOME/.cache/direnv/layouts
'';
};
}