From a65930ca21b15feb290edf3f88d210f81c964322 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 15 Mar 2022 11:27:37 +0000 Subject: nixos/locate: disable default findutils pruneNames It doesn't make sense to have a default value for this that's incompatible with the default locate implementation. It means that just doing services.locate.enable = true; generates a warning, even if you don't care about pruning anything. So only use the default prune list if the locate implementation supports it (i.e., isn't findutils). --- nixos/modules/misc/locate.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nixos/modules/misc/locate.nix') diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 66a49b0b888..204a8914300 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -183,7 +183,11 @@ in pruneNames = mkOption { type = listOf str; - default = [ ".bzr" ".cache" ".git" ".hg" ".svn" ]; + default = lib.optionals (!isFindutils) [ ".bzr" ".cache" ".git" ".hg" ".svn" ]; + defaultText = literalDocBook '' + [ ".bzr" ".cache" ".git" ".hg" ".svn" ], if + supported by the locate implementation (i.e. mlocate or plocate). + ''; description = '' Directory components which should exclude paths containing them from indexing ''; -- cgit 1.4.1