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 {
|
||||
default = cli;
|
||||
defaultText = "(See source)";
|
||||
};
|
||||
# Used by ./joinmarket-ob-watcher.nix
|
||||
ircServers = mkOption {
|
||||
readOnly = true;
|
||||
default = ircServers;
|
||||
defaultText = "(See source)";
|
||||
};
|
||||
# This option is only used by netns-isolation.
|
||||
# Tor is always enabled.
|
||||
|
@ -7,17 +7,20 @@ with lib;
|
||||
pkgs = mkOption {
|
||||
type = types.attrs;
|
||||
default = (import ../pkgs { inherit pkgs; }).modulesPkgs;
|
||||
defaultText = "nix-bitcoin/pkgs.modulesPkgs";
|
||||
};
|
||||
|
||||
lib = mkOption {
|
||||
readOnly = true;
|
||||
default = import ../pkgs/lib.nix lib pkgs;
|
||||
defaultText = "nix-bitcoin/pkgs/lib.nix";
|
||||
};
|
||||
|
||||
torClientAddressWithPort = mkOption {
|
||||
readOnly = true;
|
||||
default = with config.services.tor.client.socksListenAddress;
|
||||
"${addr}:${toString port}";
|
||||
defaultText = "(See source)";
|
||||
};
|
||||
|
||||
# Torify binary that works with custom Tor SOCKS addresses
|
||||
@ -29,6 +32,7 @@ with lib;
|
||||
--address ${config.services.tor.client.socksListenAddress.addr} \
|
||||
"$@"
|
||||
'';
|
||||
defaultText = "(See source)";
|
||||
};
|
||||
|
||||
# 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.
|
||||
then "/run/wrappers/bin/doas -u"
|
||||
else "sudo -u";
|
||||
defaultText = "(See source)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -8,6 +8,7 @@ let
|
||||
program = mkOption {
|
||||
readOnly = true;
|
||||
default = script;
|
||||
defaultText = "(See source)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user