···
+
<refentry xmlns="http://docbook.org/ns/docbook"
+
xmlns:xlink="http://www.w3.org/1999/xlink"
+
xmlns:xi="http://www.w3.org/2001/XInclude">
+
<refentrytitle><command>nixos-version</command></refentrytitle>
+
<manvolnum>8</manvolnum>
+
<refmiscinfo class="source">NixOS</refmiscinfo>
+
<refname><command>nixos-version</command></refname>
+
<refpurpose>show the version of nixpkgs NixOS was built from</refpurpose>
+
<command>nixos-version</command>
+
<arg><option>--hash</option></arg>
+
<arg><option>--revision</option></arg>
+
<refsection><title>Description</title>
+
<para>This command describes the version of nixpkgs used to build
+
<para>By default the output includes:</para>
+
<listitem><para>The NixOS release</para></listitem>
+
<listitem><para>Number of commits since the release</para></listitem>
+
<listitem><para>Git SHA of the released commit</para></listitem>
+
<listitem><para>Codename of the NixOS release</para></listitem>
+
<refsection><title>Example</title>
+
<para>Here is an example output, and corresponding information:
+
<screen>$ nixos-version
+
16.03.1011.6317da4 (Emu)
+
<entry>Attribute</entry>
+
<entry>NixOS Release</entry>
+
<entry><literal>16.03</literal></entry>
+
<entry>Commit Count</entry>
+
<entry><literal>1011</literal></entry>
+
<entry>Commit SHA</entry>
+
<entry><literal>6317da4</literal></entry>
+
<entry>Release Codename</entry>
+
<entry><literal>Emu</literal></entry>
+
<refsection><title>Options</title>
+
<para>This command accepts the following options:</para>
+
<term><option>--hash</option></term>
+
<term><option>--revision</option></term>
+
<para>The output will be the full hash of the git commit
+
<screen>$ nixos-version --hash
+
6317da40006f6bc2480c6781999c52d88dde2acf