Add some more info to the nixos-version manpage

+43 -48
+43 -48
nixos/doc/manual/man-nixos-version.xml
··· 10 10 11 11 <refnamediv> 12 12 <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> 14 14 </refnamediv> 15 15 16 16 <refsynopsisdiv> ··· 23 23 24 24 <refsection><title>Description</title> 25 25 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: 28 28 29 - <para>By default the output includes:</para> 29 + <screen>$ nixos-version 30 + 16.03.1011.6317da4 (Emu) 31 + </screen> 32 + 33 + The version consists of the following elements: 30 34 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> 35 + <variablelist> 38 36 39 - <refsection><title>Example</title> 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> 40 68 41 - <para>Here is an example output, and corresponding information: 42 - <screen>$ nixos-version 43 - 16.03.1011.6317da4 (Emu) 44 - </screen> 45 - </para> 69 + </variablelist> 46 70 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 71 </para> 77 - 78 72 79 73 </refsection> 80 74 ··· 89 83 <term><option>--hash</option></term> 90 84 <term><option>--revision</option></term> 91 85 <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. 93 88 <screen>$ nixos-version --hash 94 89 6317da40006f6bc2480c6781999c52d88dde2acf 95 90 </screen>