mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01: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:
parent
056443ccbd
commit
54de0e1d79
1 changed files with 7 additions and 4 deletions
|
@ -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 = "";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue