From 34dd64b0cc145533a935c798d5a3347d07d5d0aa Mon Sep 17 00:00:00 2001 From: bb010g <me@bb010g.com> Date: Tue, 12 Nov 2019 17:29:30 -0800 Subject: [PATCH] nixos/documentation: Allow specifying extraSources Because there was absolutely no way of setting this without rewriting parts of the module otherwise. --- nixos/modules/misc/documentation.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix index d09afadd6097..7b3f9c0fe9cd 100644 --- a/nixos/modules/misc/documentation.nix +++ b/nixos/modules/misc/documentation.nix @@ -17,6 +17,7 @@ let inherit pkgs config; version = config.system.nixos.release; revision = "release-${version}"; + extraSources = cfg.nixos.extraModuleSources; options = let scrubbedEval = evalModules { @@ -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 ] + ''; + }; + }; };