about summary refs log tree commit diff
path: root/nixos/modules/misc/locate.nix
diff options
context:
space:
mode:
authorAndrew Scott <andj.scott@gmail.com>2016-10-25 12:58:49 +0100
committerAndrew Scott <andj.scott@gmail.com>2016-10-25 13:03:04 +0100
commit1c8cb703a6934ac37bbc8d08cc9e8a6ff792076c (patch)
tree08f485c5c56289b1270d2766cb8f335dc812463b /nixos/modules/misc/locate.nix
parent6d70dd2760d36647a2a726e084514d401377ac76 (diff)
mlocate: init at version 0.26
Diffstat (limited to 'nixos/modules/misc/locate.nix')
-rw-r--r--nixos/modules/misc/locate.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix
index 27a0fa6cf3d48..3cb5bb1a351ae 100644
--- a/nixos/modules/misc/locate.nix
+++ b/nixos/modules/misc/locate.nix
@@ -15,6 +15,15 @@ in {
       '';
     };
 
+    locate = mkOption {
+      type = types.package;
+      default = pkgs.findutils;
+      example = "pkgs.mlocate";
+      description = ''
+        The locate implementation to use
+      '';
+    };
+
     interval = mkOption {
       type = types.str;
       default = "02:15";
@@ -77,7 +86,7 @@ in {
         script =
           ''
             mkdir -m 0755 -p $(dirname ${toString cfg.output})
-            exec updatedb \
+            exec ${cfg.locate}/bin/updatedb \
               --localuser=${cfg.localuser} \
               ${optionalString (!cfg.includeStore) "--prunepaths='/nix/store'"} \
               --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}