about summary refs log tree commit diff
path: root/nixos/modules/services/misc/nixos-manual.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-07-28 18:27:03 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-01 11:10:21 +0200
commit83eb49220b4a91658b710d7095899d04856875a3 (patch)
tree7d06251b9a8c349bfdb2e9f73889d6308db4590d /nixos/modules/services/misc/nixos-manual.nix
parent2a05368ff3217175cd87105e778e2e70bc7eef1c (diff)
downloadnixlib-83eb49220b4a91658b710d7095899d04856875a3.tar
nixlib-83eb49220b4a91658b710d7095899d04856875a3.tar.gz
nixlib-83eb49220b4a91658b710d7095899d04856875a3.tar.bz2
nixlib-83eb49220b4a91658b710d7095899d04856875a3.tar.lz
nixlib-83eb49220b4a91658b710d7095899d04856875a3.tar.xz
nixlib-83eb49220b4a91658b710d7095899d04856875a3.tar.zst
nixlib-83eb49220b4a91658b710d7095899d04856875a3.zip
Manual: Only include the release number (e.g. 16.03)
This prevents gratuitous rebuilds of the manual every time the Git
revision changes.

Should help a bit with #17261.
Diffstat (limited to 'nixos/modules/services/misc/nixos-manual.nix')
-rw-r--r--nixos/modules/services/misc/nixos-manual.nix12
1 files changed, 3 insertions, 9 deletions
diff --git a/nixos/modules/services/misc/nixos-manual.nix b/nixos/modules/services/misc/nixos-manual.nix
index 37ea339300d4..a60d5f7983bc 100644
--- a/nixos/modules/services/misc/nixos-manual.nix
+++ b/nixos/modules/services/misc/nixos-manual.nix
@@ -11,12 +11,6 @@ let
 
   cfg = config.services.nixosManual;
 
-  versionModule =
-    { system.nixosVersionSuffix = config.system.nixosVersionSuffix;
-      system.nixosRevision = config.system.nixosRevision;
-      nixpkgs.system = config.nixpkgs.system;
-    };
-
   /* For the purpose of generating docs, evaluate options with each derivation
     in `pkgs` (recursively) replaced by a fake with path "\${pkgs.attribute.path}".
     It isn't perfect, but it seems to cover a vast majority of use cases.
@@ -24,12 +18,12 @@ let
     the path above will be shown and not e.g. `${config.services.foo.package}`. */
   manual = import ../../../doc/manual {
     inherit pkgs;
-    version = config.system.nixosVersion;
-    revision = config.system.nixosRevision;
+    version = config.system.nixosRelease;
+    revision = "release-${config.system.nixosRelease}";
     options =
       let
         scrubbedEval = evalModules {
-          modules = [ versionModule ] ++ baseModules;
+          modules = [ { nixpkgs.system = config.nixpkgs.system; } ] ++ baseModules;
           args = (config._module.args) // { modules = [ ]; };
           specialArgs = { pkgs = scrubDerivations "pkgs" pkgs; };
         };