nixos/locate: don't create /var/cache
This is already handled by the default systemd tmpfiles. fixes #78941
This commit is contained in:
parent
5c9198d29e
commit
c9d6dee9e4
@ -131,13 +131,6 @@ in {
|
|||||||
++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component"
|
++ 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";
|
++ 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 =
|
systemd.services.update-locatedb =
|
||||||
{ description = "Update Locate Database";
|
{ description = "Update Locate Database";
|
||||||
path = mkIf (!isMLocate) [ pkgs.su ];
|
path = mkIf (!isMLocate) [ pkgs.su ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user