From 0e3981213ff68484d2cde72e6fe079059c003b32 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Fri, 18 Sep 2009 15:27:10 +0000 Subject: [PATCH] Add an option to change the policy of source file links inside the manual. The default policy use local files instead of remote ones. svn path=/nixos/trunk/; revision=17258 --- modules/services/misc/nixos-manual.nix | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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. + ''; + }; + };