mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
locate: option includeStore
This commit is contained in:
parent
479a43cf74
commit
8c652379df
@ -179,6 +179,15 @@ nix-env -f "<nixpkgs>" -iA haskellPackages.cabal-install
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
The <literal>locate</literal> service no longer indexes the nix store
|
||||
by default, preventing packages with potentially numerous versions from
|
||||
cluttering the output. Indexing the store can be activated with
|
||||
<literal>services.locate.includeStore = true;</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
|
@ -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…
Reference in New Issue
Block a user