diff --git a/modules/services/misc/nixos-manual.nix b/modules/services/misc/nixos-manual.nix index 45a38c778ead..8447bc8ae75c 100644 --- a/modules/services/misc/nixos-manual.nix +++ b/modules/services/misc/nixos-manual.nix @@ -7,14 +7,14 @@ let - inherit (pkgs.lib) mkOption mkIf; + inherit (pkgs.lib) mkOption mkIf types; cfg = config.services.nixosManual; - manual = - # We could speed up the evaluation of the manual expression by - # providing it the options of the current configuration. - import ../../../doc/manual {inherit pkgs options;}; + manual = import ../../../doc/manual { + inherit (cfg) revision; + inherit pkgs options; + }; in @@ -51,6 +51,16 @@ in ''; }; + services.nixosManual.revision = mkOption { + default = "local"; + type = types.uniq types.string; + description = '' + Revision of the targeted source file. This value can either be + "local", "HEAD" or any + revision number embedded in a string. + ''; + }; + };