1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 00:18:30 +02:00

xdg: create cache directory using keep file

We can avoid the activation block by instead creating a hidden file in
the directory.
This commit is contained in:
Robert Helgesson 2019-07-26 23:23:51 +02:00
parent 056443ccbd
commit 54de0e1d79
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89

View File

@ -92,10 +92,13 @@ in
})
{
home.file = mkMerge [ cfg.configFile cfg.dataFile ];
home.activation.xdgCreateCache = dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD mkdir $VERBOSE_ARG -m0700 -p "${config.xdg.cacheHome}"
'';
home.file = mkMerge [
cfg.configFile
cfg.dataFile
{
"${config.xdg.cacheHome}/.keep".text = "";
}
];
}
];
}