diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-24 02:02:04 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-10-24 02:03:10 +0200 |
commit | d49f141a7937399fd2feeffa37eb9726d84d0e31 (patch) | |
tree | 1a412c8275731f2fae7cb4712622804b93cb5fe4 /nixos/modules/services/misc/nixos-manual.nix | |
parent | c4149c7b564010ddcb74006db7000513a4d637a7 (diff) | |
download | nixlib-d49f141a7937399fd2feeffa37eb9726d84d0e31.tar nixlib-d49f141a7937399fd2feeffa37eb9726d84d0e31.tar.gz nixlib-d49f141a7937399fd2feeffa37eb9726d84d0e31.tar.bz2 nixlib-d49f141a7937399fd2feeffa37eb9726d84d0e31.tar.lz nixlib-d49f141a7937399fd2feeffa37eb9726d84d0e31.tar.xz nixlib-d49f141a7937399fd2feeffa37eb9726d84d0e31.tar.zst nixlib-d49f141a7937399fd2feeffa37eb9726d84d0e31.zip |
Manual: When building from the channel, link to the exact Git revision
Diffstat (limited to 'nixos/modules/services/misc/nixos-manual.nix')
-rw-r--r-- | nixos/modules/services/misc/nixos-manual.nix | 14 |
1 files changed, 3 insertions, 11 deletions
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 - <literal>"local"</literal>, <literal>"HEAD"</literal> or any - revision number embedded in a string. - ''; - }; - }; |