diff options
author | lethalman <lucabru@src.gnome.org> | 2015-08-03 10:23:30 +0200 |
---|---|---|
committer | lethalman <lucabru@src.gnome.org> | 2015-08-03 10:23:30 +0200 |
commit | fa7860f84d2018889588fcb32a4117d34634fc7d (patch) | |
tree | 6374839213feb4f37757332e3df790fc608bf8f4 /nixos/modules | |
parent | c6f5bb57853b2fde80b733744a3eabee6aa686ef (diff) | |
parent | 8c652379df07f88d6b434fe1042e9a9ba9078440 (diff) | |
download | nixlib-fa7860f84d2018889588fcb32a4117d34634fc7d.tar nixlib-fa7860f84d2018889588fcb32a4117d34634fc7d.tar.gz nixlib-fa7860f84d2018889588fcb32a4117d34634fc7d.tar.bz2 nixlib-fa7860f84d2018889588fcb32a4117d34634fc7d.tar.lz nixlib-fa7860f84d2018889588fcb32a4117d34634fc7d.tar.xz nixlib-fa7860f84d2018889588fcb32a4117d34634fc7d.tar.zst nixlib-fa7860f84d2018889588fcb32a4117d34634fc7d.zip |
Merge pull request #8036 from Profpatsch/locate
locate: option includeStore
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/misc/locate.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/misc/locate.nix b/nixos/modules/misc/locate.nix index f3ed2aaba09d..bf05c4607295 100644 --- a/nixos/modules/misc/locate.nix +++ b/nixos/modules/misc/locate.nix @@ -56,6 +56,14 @@ in { ''; }; + includeStore = mkOption { + type = types.bool; + default = false; + description = '' + Whether to include /nix/store in the locate database. + ''; + }; + }; }; @@ -63,7 +71,6 @@ in { ###### implementation config = { - systemd.services.update-locatedb = { description = "Update Locate Database"; path = [ pkgs.su ]; @@ -72,6 +79,7 @@ in { mkdir -m 0755 -p $(dirname ${toString cfg.output}) exec updatedb \ --localuser=${cfg.localuser} \ + ${optionalString (!cfg.includeStore) "--prunepaths='/nix/store'"} \ --output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags} ''; serviceConfig.Nice = 19; |