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

+10
+7
nixos/doc/manual/release-notes/rl-1803.xml
··· 430 430 and <literal>stopJob</literal> provide an optional <literal>$user</literal> argument for that purpose. 431 431 </para> 432 432 </listitem> 433 + <listitem> 434 + <para> 435 + Enabling bash completion on NixOS, <literal>programs.bash.enableCompletion</literal>, will now also enable 436 + completion for the Nix command line tools by installing the 437 + <link xlink:href="https://github.com/hedning/nix-bash-completions">nix-bash-completions</link> package. 438 + </para> 439 + </listitem> 433 440 </itemizedlist> 434 441 435 442 </section>
+3
nixos/modules/programs/bash/bash.nix
··· 211 211 "/share/bash-completion" 212 212 ]; 213 213 214 + environment.systemPackages = optional cfg.enableCompletion 215 + pkgs.nix-bash-completions; 216 + 214 217 environment.shells = 215 218 [ "/run/current-system/sw/bin/bash" 216 219 "/var/run/current-system/sw/bin/bash"