···840840 default in the CLI tooling which in turn enables us to use
841841 <literal>unbound-control</literal> without passing a custom configuration location.
842842 </para>
843843+844844+ <para>
845845+ The module has also been reworked to be <link
846846+ xlink:href="https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md">RFC
847847+ 0042</link> compliant. As such,
848848+ <option>sevices.unbound.extraConfig</option> has been removed and replaced
849849+ by <xref linkend="opt-services.unbound.settings"/>. <option>services.unbound.interfaces</option>
850850+ has been renamed to <option>services.unbound.settings.server.interface</option>.
851851+ </para>
852852+853853+ <para>
854854+ <option>services.unbound.forwardAddresses</option> and
855855+ <option>services.unbound.allowedAccess</option> have also been changed to
856856+ use the new settings interface. You can follow the instructions when
857857+ executing <literal>nixos-rebuild</literal> to upgrade your configuration to
858858+ use the new interface.
859859+ </para>
843860 </listitem>
844861 <listitem>
845862 <para>
+7-2
nixos/lib/testing-python.nix
···5454 };
55555656 # Run an automated test suite in the given virtual network.
5757- # `driver' is the script that runs the network.
5858- runTests = { driver, pos }:
5757+ runTests = {
5858+ # the script that runs the network
5959+ driver,
6060+ # a source position in the format of builtins.unsafeGetAttrPos
6161+ # for meta.position
6262+ pos,
6363+ }:
5964 stdenv.mkDerivation {
6065 name = "vm-test-run-${driver.testName}";
6166
···11+{ config, lib, pkgs, ... }:
22+33+with lib;
44+55+let
66+ enable = config.programs.bash.enableCompletion;
77+in
88+{
99+ options = {
1010+ programs.bash.enableCompletion = mkEnableOption "Bash completion for all interactive bash shells" // {
1111+ default = true;
1212+ };
1313+ };
1414+1515+ config = mkIf enable {
1616+ programs.bash.promptPluginInit = ''
1717+ # Check whether we're running a version of Bash that has support for
1818+ # programmable completion. If we do, enable all modules installed in
1919+ # the system and user profile in obsolete /etc/bash_completion.d/
2020+ # directories. Bash loads completions in all
2121+ # $XDG_DATA_DIRS/bash-completion/completions/
2222+ # on demand, so they do not need to be sourced here.
2323+ if shopt -q progcomp &>/dev/null; then
2424+ . "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
2525+ nullglobStatus=$(shopt -p nullglob)
2626+ shopt -s nullglob
2727+ for p in $NIX_PROFILES; do
2828+ for m in "$p/etc/bash_completion.d/"*; do
2929+ . $m
3030+ done
3131+ done
3232+ eval "$nullglobStatus"
3333+ unset nullglobStatus p m
3434+ fi
3535+ '';
3636+ };
3737+}
+6-39
nixos/modules/programs/bash/bash.nix
···11111212 cfg = config.programs.bash;
13131414- bashCompletion = optionalString cfg.enableCompletion ''
1515- # Check whether we're running a version of Bash that has support for
1616- # programmable completion. If we do, enable all modules installed in
1717- # the system and user profile in obsolete /etc/bash_completion.d/
1818- # directories. Bash loads completions in all
1919- # $XDG_DATA_DIRS/bash-completion/completions/
2020- # on demand, so they do not need to be sourced here.
2121- if shopt -q progcomp &>/dev/null; then
2222- . "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh"
2323- nullglobStatus=$(shopt -p nullglob)
2424- shopt -s nullglob
2525- for p in $NIX_PROFILES; do
2626- for m in "$p/etc/bash_completion.d/"*; do
2727- . $m
2828- done
2929- done
3030- eval "$nullglobStatus"
3131- unset nullglobStatus p m
3232- fi
3333- '';
3434-3535- lsColors = optionalString cfg.enableLsColors ''
3636- eval "$(${pkgs.coreutils}/bin/dircolors -b)"
3737- '';
3838-3914 bashAliases = concatStringsSep "\n" (
4015 mapAttrsFlatten (k: v: "alias ${k}=${escapeShellArg v}")
4116 (filterAttrs (k: v: v != null) cfg.shellAliases)
···12398 type = types.lines;
12499 };
125100126126- enableCompletion = mkOption {
127127- default = true;
101101+ promptPluginInit = mkOption {
102102+ default = "";
128103 description = ''
129129- Enable Bash completion for all interactive bash shells.
104104+ Shell script code used to initialise bash prompt plugins.
130105 '';
131131- type = types.bool;
132132- };
133133-134134- enableLsColors = mkOption {
135135- default = true;
136136- description = ''
137137- Enable extra colors in directory listings.
138138- '';
139139- type = types.bool;
106106+ type = types.lines;
107107+ internal = true;
140108 };
141109142110 };
···167135 set +h
168136169137 ${cfg.promptInit}
170170- ${bashCompletion}
171171- ${lsColors}
138138+ ${cfg.promptPluginInit}
172139 ${bashAliases}
173140174141 ${cfge.interactiveShellInit}