diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-07-28 18:27:03 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-08-01 11:10:21 +0200 |
commit | 83eb49220b4a91658b710d7095899d04856875a3 (patch) | |
tree | 7d06251b9a8c349bfdb2e9f73889d6308db4590d /nixos | |
parent | 2a05368ff3217175cd87105e778e2e70bc7eef1c (diff) | |
download | nixlib-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')
-rw-r--r-- | nixos/modules/misc/version.nix | 10 | ||||
-rw-r--r-- | nixos/modules/services/misc/nixos-manual.nix | 12 |
2 files changed, 8 insertions, 14 deletions
diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index 9158d82a73a6..6d4d3a9eea34 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -43,34 +43,34 @@ in nixosVersion = mkOption { internal = true; type = types.str; - description = "NixOS version."; + description = "The full NixOS version (e.g. <literal>16.03.1160.f2d4ee1</literal>)."; }; nixosRelease = mkOption { readOnly = true; type = types.str; default = readFile releaseFile; - description = "NixOS release."; + description = "The NixOS release (e.g. <literal>16.03</literal>)."; }; nixosVersionSuffix = mkOption { internal = true; type = types.str; default = if pathExists suffixFile then readFile suffixFile else "pre-git"; - description = "NixOS version suffix."; + description = "The NixOS version suffix (e.g. <literal>1160.f2d4ee1</literal>)."; }; nixosRevision = mkOption { internal = true; type = types.str; default = if pathExists revisionFile then readFile revisionFile else "master"; - description = "NixOS Git revision hash."; + description = "The Git revision from which this NixOS configuration was built."; }; nixosCodeName = mkOption { readOnly = true; type = types.str; - description = "NixOS release code name."; + description = "The NixOS release code name (e.g. <literal>Emu</literal>)."; }; defaultChannel = mkOption { 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; }; }; |