mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
nixos/documentation: Make extraModules configurable
This commit is contained in:
parent
e135c417bb
commit
9a0b26b216
2 changed files with 10 additions and 4 deletions
|
@ -7,9 +7,6 @@ let
|
|||
cfg = config.documentation;
|
||||
allOpts = options;
|
||||
|
||||
/* Modules for which to show options even when not imported. */
|
||||
extraDocModules = [ ../virtualisation/qemu-vm.nix ];
|
||||
|
||||
canCacheDocs = m:
|
||||
let
|
||||
f = import m;
|
||||
|
@ -23,7 +20,7 @@ let
|
|||
|
||||
docModules =
|
||||
let
|
||||
p = partition canCacheDocs (baseModules ++ extraDocModules);
|
||||
p = partition canCacheDocs (baseModules ++ cfg.nixos.extraModules);
|
||||
in
|
||||
{
|
||||
lazy = p.right;
|
||||
|
@ -236,6 +233,14 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
nixos.extraModules = mkOption {
|
||||
type = types.listOf types.raw;
|
||||
default = [];
|
||||
description = ''
|
||||
Modules for which to show options even when not imported.
|
||||
'';
|
||||
};
|
||||
|
||||
nixos.options.splitBuild = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue