1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 22:50:49 +00:00

locate.nix: Don't create /var/cache

Fixes

  setting up tmpfiles
  [/etc/tmpfiles.d/var.conf:19] Duplicate line for path "/var/cache", ignoring.
This commit is contained in:
Eelco Dolstra 2019-10-08 21:45:42 +02:00
parent 4466427a32
commit b407822b85

View file

@ -128,7 +128,10 @@ in {
# directory creation needs to be separated from main service
# because ReadWritePaths fails when the directory doesn't already exist
systemd.tmpfiles.rules = [ "d ${dirOf cfg.output} 0755 root root -" ];
systemd.tmpfiles.rules =
let dir = dirOf cfg.output; in
mkIf (dir != "/var/cache")
[ "d ${dir} 0755 root root -" ];
systemd.services.update-locatedb =
{ description = "Update Locate Database";