diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-10-08 21:45:42 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-10-08 21:45:42 +0200 |
commit | b407822b8563186fed3b7527d9c8ae06e29af030 (patch) | |
tree | 6b21d5ac20533b47c2fdf4205e8bba98a3a748fb /nixos/modules/misc | |
parent | 4466427a32f0ac7e4994ae4b52f1c2b85b53b999 (diff) |
locate.nix: Don't create /var/cache
Fixes
setting up tmpfiles
[/etc/tmpfiles.d/var.conf:19] Duplicate line for path "/var/cache", ignoring.
Diffstat (limited to 'nixos/modules/misc')
-rw-r--r-- | nixos/modules/misc/locate.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 449149e4bb65..737ed5c0a3f6 100644 --- a/nixos/modules/misc/locate.nix +++ b/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"; |