forked from mirrors/nixpkgs
Allow options to be marked as "internal"
This means they're not for end users. Currently they're filtered from the manual, but we could include them in a separate section.
This commit is contained in:
parent
e29b51bfb1
commit
29014a47fb
|
@ -275,6 +275,7 @@ rec {
|
|||
description = opt.description or (throw "Option ${opt.name}: No description.");
|
||||
declarations = map (x: toString x.source) opt.declarations;
|
||||
#definitions = map (x: toString x.source) opt.definitions;
|
||||
internal = opt.internal or false;
|
||||
}
|
||||
// optionalAttrs (opt ? example) { example = scrubOptionValue opt.example; }
|
||||
// optionalAttrs (opt ? default) { default = scrubOptionValue opt.default; }
|
||||
|
|
|
@ -7,8 +7,9 @@ with pkgs.lib;
|
|||
|
||||
let
|
||||
|
||||
optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext
|
||||
(builtins.toXML (optionAttrSetToDocList options)));
|
||||
options' = filter (x: !x.internal) (optionAttrSetToDocList options);
|
||||
|
||||
optionsXML = builtins.toFile "options.xml" (builtins.unsafeDiscardStringContext (builtins.toXML options'));
|
||||
|
||||
optionsDocBook = pkgs.runCommand "options-db.xml" {} ''
|
||||
${pkgs.libxslt}/bin/xsltproc \
|
||||
|
|
|
@ -85,6 +85,7 @@ in
|
|||
system = {
|
||||
|
||||
path = mkOption {
|
||||
internal = true;
|
||||
description = ''
|
||||
The packages you want in the boot environment.
|
||||
'';
|
||||
|
|
|
@ -13,6 +13,7 @@ in
|
|||
options = {
|
||||
|
||||
assertions = mkOption {
|
||||
internal = true;
|
||||
default = [];
|
||||
example = [ { assertion = false; message = "you can't enable this for that reason"; } ];
|
||||
merge = pkgs.lib.mergeListOption;
|
||||
|
|
|
@ -7,16 +7,19 @@ with pkgs.lib;
|
|||
options = {
|
||||
|
||||
system.nixosVersion = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
description = "NixOS version.";
|
||||
};
|
||||
|
||||
system.nixosVersionSuffix = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
description = "NixOS version suffix.";
|
||||
};
|
||||
|
||||
system.nixosCodeName = mkOption {
|
||||
internal = true;
|
||||
type = types.uniq types.string;
|
||||
description = "NixOS release code name.";
|
||||
};
|
||||
|
|
|
@ -122,6 +122,7 @@ in
|
|||
options = {
|
||||
|
||||
system.build = mkOption {
|
||||
internal = true;
|
||||
default = {};
|
||||
description = ''
|
||||
Attribute set of derivations used to setup the system.
|
||||
|
@ -144,6 +145,7 @@ in
|
|||
};
|
||||
|
||||
system.boot.loader.id = mkOption {
|
||||
internal = true;
|
||||
default = "";
|
||||
description = ''
|
||||
Id string of the used bootloader.
|
||||
|
@ -151,6 +153,7 @@ in
|
|||
};
|
||||
|
||||
system.boot.loader.kernelFile = mkOption {
|
||||
internal = true;
|
||||
default = pkgs.stdenv.platform.kernelTarget;
|
||||
type = types.uniq types.string;
|
||||
description = ''
|
||||
|
@ -169,8 +172,8 @@ in
|
|||
};
|
||||
|
||||
system.extraSystemBuilderCmds = mkOption {
|
||||
default = "";
|
||||
internal = true;
|
||||
default = "";
|
||||
merge = concatStringsSep "\n";
|
||||
description = ''
|
||||
This code will be added to the builder creating the system store path.
|
||||
|
|
Loading…
Reference in a new issue