programs/bash: install nix-bash-completions if completion is enabled

This commit is contained in:
Tor Hedin Brønner 2018-02-28 14:54:52 +01:00
parent 30d5c7ce56
commit c58072309c
2 changed files with 10 additions and 0 deletions

View File

@ -430,6 +430,13 @@ following incompatible changes:</para>
and <literal>stopJob</literal> provide an optional <literal>$user</literal> argument for that purpose.
</para>
</listitem>
<listitem>
<para>
Enabling bash completion on NixOS, <literal>programs.bash.enableCompletion</literal>, will now also enable
completion for the Nix command line tools by installing the
<link xlink:href="https://github.com/hedning/nix-bash-completions">nix-bash-completions</link> package.
</para>
</listitem>
</itemizedlist>
</section>

View File

@ -211,6 +211,9 @@ in
"/share/bash-completion"
];
environment.systemPackages = optional cfg.enableCompletion
pkgs.nix-bash-completions;
environment.shells =
[ "/run/current-system/sw/bin/bash"
"/var/run/current-system/sw/bin/bash"