Merge pull request #79022 from Mic92/locate

nixos/locate: don't create /var/cache
This commit is contained in:
Linus Heckemann 2020-02-01 19:31:00 +01:00 committed by GitHub
commit 9bc90bff3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 ];