mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-11 21:06:19 +03:00
Merge pull request #8036 from Profpatsch/locate
locate: option includeStore
This commit is contained in:
commit
fa7860f84d
2 changed files with 18 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue