xdg: create $XDG_CACHE_HOME

some programs fail silently (bash with HISTFILE for instance) when the
folder doesn't exist.
This commit is contained in:
Matthieu Coudron 2018-08-16 18:31:10 +09:00
parent 99c900946d
commit 49ea5e707d

View file

@ -6,6 +6,8 @@ let
cfg = config.xdg;
dag = config.lib.dag;
fileType = (import ../lib/file-type.nix {
inherit (config.home) homeDirectory;
inherit lib pkgs;
@ -91,6 +93,9 @@ in
{
home.file = mkMerge [ cfg.configFile cfg.dataFile ];
home.activation.xdgCreateCache = dag.entryAfter [ "linkGeneration" ] ''
mkdir -m=700 -p ${config.xdg.cacheHome}
'';
}
];
}