nixos/locate: don't create /var/cache

This is already handled by the default systemd tmpfiles.

fixes #78941
This commit is contained in:
Jörg Thalheim 2020-02-01 17:13:41 +00:00
parent 5c9198d29e
commit c9d6dee9e4
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -131,13 +131,6 @@ in {
++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component"
++ optional (isFindutils && cfg.pruneBindMounts) "findutils locate does not support skipping bind mounts";
# directory creation needs to be separated from main service
# because ReadWritePaths fails when the directory doesn't already exist
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";
path = mkIf (!isMLocate) [ pkgs.su ];