···43 nixosVersion = mkOption {
44 internal = true;
45 type = types.str;
46+ description = "The full NixOS version (e.g. <literal>16.03.1160.f2d4ee1</literal>).";
47 };
4849 nixosRelease = mkOption {
50 readOnly = true;
51 type = types.str;
52 default = readFile releaseFile;
53+ description = "The NixOS release (e.g. <literal>16.03</literal>).";
54 };
5556 nixosVersionSuffix = mkOption {
57 internal = true;
58 type = types.str;
59 default = if pathExists suffixFile then readFile suffixFile else "pre-git";
60+ description = "The NixOS version suffix (e.g. <literal>1160.f2d4ee1</literal>).";
61 };
6263 nixosRevision = mkOption {
64 internal = true;
65 type = types.str;
66 default = if pathExists revisionFile then readFile revisionFile else "master";
67+ description = "The Git revision from which this NixOS configuration was built.";
68 };
6970 nixosCodeName = mkOption {
71 readOnly = true;
72 type = types.str;
73+ description = "The NixOS release code name (e.g. <literal>Emu</literal>).";
74 };
7576 defaultChannel = mkOption {
+3-9
nixos/modules/services/misc/nixos-manual.nix
···1112 cfg = config.services.nixosManual;
1314- versionModule =
15- { system.nixosVersionSuffix = config.system.nixosVersionSuffix;
16- system.nixosRevision = config.system.nixosRevision;
17- nixpkgs.system = config.nixpkgs.system;
18- };
19-20 /* For the purpose of generating docs, evaluate options with each derivation
21 in `pkgs` (recursively) replaced by a fake with path "\${pkgs.attribute.path}".
22 It isn't perfect, but it seems to cover a vast majority of use cases.
···24 the path above will be shown and not e.g. `${config.services.foo.package}`. */
25 manual = import ../../../doc/manual {
26 inherit pkgs;
27- version = config.system.nixosVersion;
28- revision = config.system.nixosRevision;
29 options =
30 let
31 scrubbedEval = evalModules {
32- modules = [ versionModule ] ++ baseModules;
33 args = (config._module.args) // { modules = [ ]; };
34 specialArgs = { pkgs = scrubDerivations "pkgs" pkgs; };
35 };
···1112 cfg = config.services.nixosManual;
1300000014 /* For the purpose of generating docs, evaluate options with each derivation
15 in `pkgs` (recursively) replaced by a fake with path "\${pkgs.attribute.path}".
16 It isn't perfect, but it seems to cover a vast majority of use cases.
···18 the path above will be shown and not e.g. `${config.services.foo.package}`. */
19 manual = import ../../../doc/manual {
20 inherit pkgs;
21+ version = config.system.nixosRelease;
22+ revision = "release-${config.system.nixosRelease}";
23 options =
24 let
25 scrubbedEval = evalModules {
26+ modules = [ { nixpkgs.system = config.nixpkgs.system; } ] ++ baseModules;
27 args = (config._module.args) // { modules = [ ]; };
28 specialArgs = { pkgs = scrubDerivations "pkgs" pkgs; };
29 };