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

Fixes

  setting up tmpfiles
  [/etc/tmpfiles.d/var.conf:19] Duplicate line for path "/var/cache", ignoring.
wip/yesman
Eelco Dolstra 5 years ago
parent 4466427a32
commit b407822b85
  1. 5
      nixos/modules/misc/locate.nix

@ -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";

Loading…
Cancel
Save