diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-06-11 00:10:09 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-06-11 00:10:09 +0200 |
commit | dec5ef74b0e913d87f4bf1ab5f02622f9b9292e9 (patch) | |
tree | bc59f7881005d286f68d525656aedac9c8fae6d4 | |
parent | d2943a89bb6699bab2493d7d4ef7dac6745cab37 (diff) |
nixos/locate: only set LOCATE_PATH for findutils locate
For plocate/mlocate it causes the results to be printed twice.
-rw-r--r-- | nixos/modules/misc/locate.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index 84c711c2b4efa..bca350b4bf62b 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` |