From dec5ef74b0e913d87f4bf1ab5f02622f9b9292e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 11 Jun 2024 00:10:09 +0200 Subject: [PATCH] nixos/locate: only set LOCATE_PATH for findutils locate For plocate/mlocate it causes the results to be printed twice. --- nixos/modules/misc/locate.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 84c711c2b4ef..bca350b4bf62 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -227,7 +227,9 @@ in environment.systemPackages = [ cfg.package ]; - environment.variables.LOCATE_PATH = cfg.output; + environment.variables = lib.mkIf isFindutils { + LOCATE_PATH = cfg.output; + }; environment.etc = { # write /etc/updatedb.conf for manual calls to `updatedb`