@@ -10,7 +10,7 @@
1010
1111<refnamediv>
1212 <refname><command>nixos-version</command></refname>
13− <refpurpose>show the version of nixpkgs NixOS was built from</refpurpose>
13+ <refpurpose>show the NixOS version</refpurpose>
1414</refnamediv>
1515
1616<refsynopsisdiv>
@@ -23,58 +23,52 @@
2323
2424<refsection><title>Description</title>
2525
26−<para>This command describes the version of nixpkgs used to build
27−NixOS.</para>
26+<para>This command shows the version of the currently active NixOS
27+configuration. For example:
2828
29−<para>By default the output includes:</para>
30−
31−<itemizedlist>
32− <listitem><para>The NixOS release</para></listitem>
33− <listitem><para>Number of commits since the release</para></listitem>
34− <listitem><para>Git SHA of the released commit</para></listitem>
35− <listitem><para>Codename of the NixOS release</para></listitem>
36−</itemizedlist>
37−</refsection>
38−
39−<refsection><title>Example</title>
40−
41−<para>Here is an example output, and corresponding information:
4229<screen>$ nixos-version
433016.03.1011.6317da4 (Emu)
4431</screen>
45−</para>
4632
47−<informaltable>
48− <tgroup cols="2">
49− <thead>
50− <row>
51− <entry>Attribute</entry>
52− <entry>Value</entry>
53− </row>
54− </thead>
55− <tbody>
56− <row>
57− <entry>NixOS Release</entry>
58− <entry><literal>16.03</literal></entry>
59− </row>
60− <row>
61− <entry>Commit Count</entry>
62− <entry><literal>1011</literal></entry>
63− </row>
64− <row>
65− <entry>Commit SHA</entry>
66− <entry><literal>6317da4</literal></entry>
67− </row>
68− <row>
69− <entry>Release Codename</entry>
70− <entry><literal>Emu</literal></entry>
71− </row>
72− </tbody>
73− </tgroup>
74−</informaltable>
75−<para>
76−</para>
33+The version consists of the following elements:
7734
35+<variablelist>
36+
37+ <varlistentry>
38+ <term><literal>16.03</literal></term>
39+ <listitem><para>The NixOS release, indicating the year and month
40+ in which it was released (e.g. March 2016).</para></listitem>
41+ </varlistentry>
42+
43+ <varlistentry>
44+ <term><literal>1011</literal></term>
45+ <listitem><para>The number of commits in the Nixpkgs Git
46+ repository between the start of the release branch and the commit
47+ from which this version was built. This ensures that NixOS
48+ versions are monotonically increasing. It is
49+ <literal>git</literal> when the current NixOS configuration was
50+ built from a checkout of the Nixpkgs Git repository rather than
51+ from a NixOS channel.</para></listitem>
52+ </varlistentry>
53+
54+ <varlistentry>
55+ <term><literal>6317da4</literal></term>
56+ <listitem><para>The first 7 characters of the commit in the
57+ Nixpkgs Git repository from which this version was
58+ built.</para></listitem>
59+ </varlistentry>
60+
61+ <varlistentry>
62+ <term><literal>Emu</literal></term>
63+ <listitem><para>The code name of the NixOS release. The first
64+ letter of the code name indicates that this is the N'th stable
65+ NixOS release; for example, Emu is the fifth
66+ release.</para></listitem>
67+ </varlistentry>
68+
69+</variablelist>
70+
71+</para>
7872
7973</refsection>
8074
@@ -89,7 +83,8 @@ NixOS.</para>
8983 <term><option>--hash</option></term>
9084 <term><option>--revision</option></term>
9185 <listitem>
92− <para>The output will be the full hash of the git commit
86+ <para>Show the full SHA1 hash of the Git commit from which this
87+ configuration was built, e.g.
9388<screen>$ nixos-version --hash
94896317da40006f6bc2480c6781999c52d88dde2acf
9590</screen>