summary refs log tree commit diff
path: root/nixos/modules/misc
diff options
context:
space:
mode:
authorAnders Kaseorg <andersk@mit.edu>2020-02-04 14:00:20 -0800
committerAnders Kaseorg <andersk@mit.edu>2020-03-25 13:32:26 -0700
commitdb28ce35357c15a1407eba23715938aa256d120e (patch)
treebe40cf56748c1743d3fe793dd05699e3851e48ce /nixos/modules/misc
parenta21c2fa3ea2b88e698db6fc151d9c7259ae14d96 (diff)
downloadnixpkgs-db28ce35357c15a1407eba23715938aa256d120e.tar
nixpkgs-db28ce35357c15a1407eba23715938aa256d120e.tar.gz
nixpkgs-db28ce35357c15a1407eba23715938aa256d120e.tar.bz2
nixpkgs-db28ce35357c15a1407eba23715938aa256d120e.tar.lz
nixpkgs-db28ce35357c15a1407eba23715938aa256d120e.tar.xz
nixpkgs-db28ce35357c15a1407eba23715938aa256d120e.tar.zst
nixpkgs-db28ce35357c15a1407eba23715938aa256d120e.zip
locate: Clarify mlocate warning message
Make it clear that the warning is that updatedb will run as root, not
that locate will only run as root.  Also explain how to silence the
warning.

Fixes #30864.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'nixos/modules/misc')
-rw-r--r--nixos/modules/misc/locate.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index 552535c253e..e78c37a0013 100644
--- a/nixos/modules/misc/locate.nix
+++ b/nixos/modules/misc/locate.nix
@@ -127,7 +127,7 @@ in {
       { LOCATE_PATH = cfg.output;
       };
 
-    warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support searching as user other than root"
+    warnings = optional (isMLocate && cfg.localuser != null) "mlocate does not support the services.locate.localuser option; updatedb will run as root. (Silence with services.locate.localuser = null.)"
             ++ optional (isFindutils && cfg.pruneNames != []) "findutils locate does not support pruning by directory component"
             ++ optional (isFindutils && cfg.pruneBindMounts) "findutils locate does not support skipping bind mounts";