Skip to content

Commit

Permalink
nixos/documentation: Allow specifying extraSources
Browse files Browse the repository at this point in the history
Because there was absolutely no way of setting this without rewriting
parts of the module otherwise.

(cherry picked from commit 34dd64b)
  • Loading branch information
bb010g authored and infinisil committed Apr 25, 2020
1 parent 4b6bfec commit 6df8f27
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions nixos/modules/misc/documentation.nix
Expand Up @@ -17,6 +17,7 @@ let
inherit pkgs config;
version = config.system.nixos.release;
revision = "release-${version}";
extraSources = cfg.nixos.extraModuleSources;
options =
let
scrubbedEval = evalModules {
Expand Down Expand Up @@ -163,6 +164,19 @@ in
'';
};

nixos.extraModuleSources = mkOption {
type = types.listOf (types.either types.path types.str);
default = [ ];
description = ''
Which extra NixOS module paths the generated NixOS's documentation should strip
from options.
'';
example = literalExample ''
# e.g. with options from modules in ''${pkgs.customModules}/nix:
[ pkgs.customModules ]
'';
};

};

};
Expand Down

0 comments on commit 6df8f27

Please sign in to comment.