treewide: add defaultText
(manual)
This enables generating module option documentation. Add `defaultText` to options where the default value can't be evaluated during metadata generation.
This commit is contained in:
parent
f0096371bf
commit
d24c029435
@ -44,11 +44,13 @@ let
|
|||||||
};
|
};
|
||||||
cli = mkOption {
|
cli = mkOption {
|
||||||
default = cli;
|
default = cli;
|
||||||
|
defaultText = "(See source)";
|
||||||
};
|
};
|
||||||
# Used by ./joinmarket-ob-watcher.nix
|
# Used by ./joinmarket-ob-watcher.nix
|
||||||
ircServers = mkOption {
|
ircServers = mkOption {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
default = ircServers;
|
default = ircServers;
|
||||||
|
defaultText = "(See source)";
|
||||||
};
|
};
|
||||||
# This option is only used by netns-isolation.
|
# This option is only used by netns-isolation.
|
||||||
# Tor is always enabled.
|
# Tor is always enabled.
|
||||||
|
@ -7,17 +7,20 @@ with lib;
|
|||||||
pkgs = mkOption {
|
pkgs = mkOption {
|
||||||
type = types.attrs;
|
type = types.attrs;
|
||||||
default = (import ../pkgs { inherit pkgs; }).modulesPkgs;
|
default = (import ../pkgs { inherit pkgs; }).modulesPkgs;
|
||||||
|
defaultText = "nix-bitcoin/pkgs.modulesPkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
lib = mkOption {
|
lib = mkOption {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
default = import ../pkgs/lib.nix lib pkgs;
|
default = import ../pkgs/lib.nix lib pkgs;
|
||||||
|
defaultText = "nix-bitcoin/pkgs/lib.nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
torClientAddressWithPort = mkOption {
|
torClientAddressWithPort = mkOption {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
default = with config.services.tor.client.socksListenAddress;
|
default = with config.services.tor.client.socksListenAddress;
|
||||||
"${addr}:${toString port}";
|
"${addr}:${toString port}";
|
||||||
|
defaultText = "(See source)";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Torify binary that works with custom Tor SOCKS addresses
|
# Torify binary that works with custom Tor SOCKS addresses
|
||||||
@ -29,6 +32,7 @@ with lib;
|
|||||||
--address ${config.services.tor.client.socksListenAddress.addr} \
|
--address ${config.services.tor.client.socksListenAddress.addr} \
|
||||||
"$@"
|
"$@"
|
||||||
'';
|
'';
|
||||||
|
defaultText = "(See source)";
|
||||||
};
|
};
|
||||||
|
|
||||||
# A helper for using doas instead of sudo when doas is enabled
|
# A helper for using doas instead of sudo when doas is enabled
|
||||||
@ -38,6 +42,7 @@ with lib;
|
|||||||
# TODO-EXTERNAL: Use absolute path until https://github.com/NixOS/nixpkgs/pull/133622 is available.
|
# TODO-EXTERNAL: Use absolute path until https://github.com/NixOS/nixpkgs/pull/133622 is available.
|
||||||
then "/run/wrappers/bin/doas -u"
|
then "/run/wrappers/bin/doas -u"
|
||||||
else "sudo -u";
|
else "sudo -u";
|
||||||
|
defaultText = "(See source)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -8,6 +8,7 @@ let
|
|||||||
program = mkOption {
|
program = mkOption {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
default = script;
|
default = script;
|
||||||
|
defaultText = "(See source)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user