···
1
+
<refentry xmlns="http://docbook.org/ns/docbook"
2
+
xmlns:xlink="http://www.w3.org/1999/xlink"
3
+
xmlns:xi="http://www.w3.org/2001/XInclude">
6
+
<refentrytitle><command>nixos-version</command></refentrytitle>
7
+
<manvolnum>8</manvolnum>
8
+
<refmiscinfo class="source">NixOS</refmiscinfo>
12
+
<refname><command>nixos-version</command></refname>
13
+
<refpurpose>show the version of nixpkgs NixOS was built from</refpurpose>
18
+
<command>nixos-version</command>
19
+
<arg><option>--hash</option></arg>
20
+
<arg><option>--revision</option></arg>
24
+
<refsection><title>Description</title>
26
+
<para>This command describes the version of nixpkgs used to build
29
+
<para>By default the output includes:</para>
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>
39
+
<refsection><title>Example</title>
41
+
<para>Here is an example output, and corresponding information:
42
+
<screen>$ nixos-version
43
+
16.03.1011.6317da4 (Emu)
51
+
<entry>Attribute</entry>
52
+
<entry>Value</entry>
57
+
<entry>NixOS Release</entry>
58
+
<entry><literal>16.03</literal></entry>
61
+
<entry>Commit Count</entry>
62
+
<entry><literal>1011</literal></entry>
65
+
<entry>Commit SHA</entry>
66
+
<entry><literal>6317da4</literal></entry>
69
+
<entry>Release Codename</entry>
70
+
<entry><literal>Emu</literal></entry>
82
+
<refsection><title>Options</title>
84
+
<para>This command accepts the following options:</para>
89
+
<term><option>--hash</option></term>
90
+
<term><option>--revision</option></term>
92
+
<para>The output will be the full hash of the git commit
93
+
<screen>$ nixos-version --hash
94
+
6317da40006f6bc2480c6781999c52d88dde2acf