From d49f141a7937399fd2feeffa37eb9726d84d0e31 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 Oct 2013 02:02:04 +0200 Subject: Manual: When building from the channel, link to the exact Git revision --- nixos/modules/services/misc/nixos-manual.nix | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'nixos/modules/services/misc') diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix index 1260272b68e9..c522868c1d98 100644 --- a/nixos/modules/services/misc/nixos-manual.nix +++ b/nixos/modules/services/misc/nixos-manual.nix @@ -12,8 +12,10 @@ let cfg = config.services.nixosManual; manual = import ../../../doc/manual { - inherit (cfg) revision; inherit pkgs; + revision = + let fn = "${toString pkgs.path}/.git-revision"; + in if pathExists fn then readFile fn else "master"; options = (fixMergeModules baseModules (removeAttrs extraArgs ["config" "options"]) // { modules = [ ]; @@ -75,16 +77,6 @@ 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. - ''; - }; - }; -- cgit 1.4.1