From ea59b79f31beaf4a8cb0ea2fc4dfba5732e4212a Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Wed, 16 Aug 2023 09:02:23 +0200 Subject: [PATCH] bat: generate cache file in XDG cache home Fixes #4345 --- modules/programs/bat.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/programs/bat.nix b/modules/programs/bat.nix index 6890a28a8..ccef131e5 100644 --- a/modules/programs/bat.nix +++ b/modules/programs/bat.nix @@ -72,8 +72,11 @@ in { (name: body: { "bat/themes/${name}.tmTheme" = { text = body; }; })); home.activation.batCache = hm.dag.entryAfter [ "linkGeneration" ] '' - $VERBOSE_ECHO "Rebuilding bat theme cache" - $DRY_RUN_CMD ${lib.getExe package} cache --build + ( + export XDG_CACHE_HOME=${escapeShellArg config.xdg.cacheHome} + $VERBOSE_ECHO "Rebuilding bat theme cache" + $DRY_RUN_CMD ${lib.getExe package} cache --build + ) ''; }; }