1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-04 18:29:45 +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:
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.file = mkMerge [
home.activation.xdgCreateCache = dag.entryAfter [ "writeBoundary" ] '' cfg.configFile
$DRY_RUN_CMD mkdir $VERBOSE_ARG -m0700 -p "${config.xdg.cacheHome}" cfg.dataFile
''; {
"${config.xdg.cacheHome}/.keep".text = "";
}
];
} }
]; ];
} }