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).
This commit is contained in:
@@ -183,7 +183,11 @@ in
|
|||||||
|
|
||||||
pruneNames = mkOption {
|
pruneNames = mkOption {
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
default = [ ".bzr" ".cache" ".git" ".hg" ".svn" ];
|
default = lib.optionals (!isFindutils) [ ".bzr" ".cache" ".git" ".hg" ".svn" ];
|
||||||
|
defaultText = literalDocBook ''
|
||||||
|
<literal>[ ".bzr" ".cache" ".git" ".hg" ".svn" ]</literal>, if
|
||||||
|
supported by the locate implementation (i.e. mlocate or plocate).
|
||||||
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Directory components which should exclude paths containing them from indexing
|
Directory components which should exclude paths containing them from indexing
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user