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:
parent
6630cfbe16
commit
7a8d50a803
|
@ -6,6 +6,8 @@ let
|
||||||
|
|
||||||
cfg = config.xdg;
|
cfg = config.xdg;
|
||||||
|
|
||||||
|
dag = config.lib.dag;
|
||||||
|
|
||||||
fileType = (import ../lib/file-type.nix {
|
fileType = (import ../lib/file-type.nix {
|
||||||
inherit (config.home) homeDirectory;
|
inherit (config.home) homeDirectory;
|
||||||
inherit lib pkgs;
|
inherit lib pkgs;
|
||||||
|
@ -91,6 +93,9 @@ in
|
||||||
|
|
||||||
{
|
{
|
||||||
home.file = mkMerge [ cfg.configFile cfg.dataFile ];
|
home.file = mkMerge [ cfg.configFile cfg.dataFile ];
|
||||||
|
home.activation.xdgCreateCache = dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
$DRY_RUN_CMD mkdir $VERBOSE_ARG -m0700 -p "${config.xdg.cacheHome}"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue