summary refs log tree commit diff
path: root/nixos/doc/manual/man-nixos-version.xml
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2016-07-12 14:29:13 +0000
committerDomen Kožar <domen@dev.si>2016-07-12 16:29:13 +0200
commitd9724bcdbfc5e04297f0cab6e31f20a47a33fd11 (patch)
treedd55c404014f87953789d3ae8bd846f024f2468b /nixos/doc/manual/man-nixos-version.xml
parent3df7f3cbc303a6c867245d5faa37a4989f0982eb (diff)
downloadnixpkgs-d9724bcdbfc5e04297f0cab6e31f20a47a33fd11.tar
nixpkgs-d9724bcdbfc5e04297f0cab6e31f20a47a33fd11.tar.gz
nixpkgs-d9724bcdbfc5e04297f0cab6e31f20a47a33fd11.tar.bz2
nixpkgs-d9724bcdbfc5e04297f0cab6e31f20a47a33fd11.tar.lz
nixpkgs-d9724bcdbfc5e04297f0cab6e31f20a47a33fd11.tar.xz
nixpkgs-d9724bcdbfc5e04297f0cab6e31f20a47a33fd11.tar.zst
nixpkgs-d9724bcdbfc5e04297f0cab6e31f20a47a33fd11.zip
doc: add man page for nixos-version (#16869)
Diffstat (limited to 'nixos/doc/manual/man-nixos-version.xml')
-rw-r--r--nixos/doc/manual/man-nixos-version.xml102
1 files changed, 102 insertions, 0 deletions
diff --git a/nixos/doc/manual/man-nixos-version.xml b/nixos/doc/manual/man-nixos-version.xml
new file mode 100644
index 00000000000..db7440977c9
--- /dev/null
+++ b/nixos/doc/manual/man-nixos-version.xml
@@ -0,0 +1,102 @@
+<refentry xmlns="http://docbook.org/ns/docbook"
+          xmlns:xlink="http://www.w3.org/1999/xlink"
+          xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<refmeta>
+  <refentrytitle><command>nixos-version</command></refentrytitle>
+  <manvolnum>8</manvolnum>
+  <refmiscinfo class="source">NixOS</refmiscinfo>
+</refmeta>
+
+<refnamediv>
+  <refname><command>nixos-version</command></refname>
+  <refpurpose>show the version of nixpkgs NixOS was built from</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+  <cmdsynopsis>
+    <command>nixos-version</command>
+    <arg><option>--hash</option></arg>
+    <arg><option>--revision</option></arg>
+  </cmdsynopsis>
+</refsynopsisdiv>
+
+<refsection><title>Description</title>
+
+<para>This command describes the version of nixpkgs used to build
+NixOS.</para>
+
+<para>By default the output includes:</para>
+
+<itemizedlist>
+  <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>
+</itemizedlist>
+</refsection>
+
+<refsection><title>Example</title>
+
+<para>Here is an example output, and corresponding information:
+<screen>$ nixos-version
+16.03.1011.6317da4 (Emu)
+</screen>
+</para>
+
+<informaltable>
+  <tgroup cols="2">
+    <thead>
+      <row>
+        <entry>Attribute</entry>
+        <entry>Value</entry>
+      </row>
+    </thead>
+    <tbody>
+      <row>
+        <entry>NixOS Release</entry>
+        <entry><literal>16.03</literal></entry>
+      </row>
+      <row>
+        <entry>Commit Count</entry>
+        <entry><literal>1011</literal></entry>
+      </row>
+      <row>
+        <entry>Commit SHA</entry>
+        <entry><literal>6317da4</literal></entry>
+      </row>
+      <row>
+        <entry>Release Codename</entry>
+        <entry><literal>Emu</literal></entry>
+      </row>
+    </tbody>
+  </tgroup>
+</informaltable>
+<para>
+</para>
+
+
+</refsection>
+
+
+<refsection><title>Options</title>
+
+<para>This command accepts the following options:</para>
+
+<variablelist>
+
+  <varlistentry>
+    <term><option>--hash</option></term>
+    <term><option>--revision</option></term>
+    <listitem>
+      <para>The output will be the full hash of the git commit
+<screen>$ nixos-version --hash
+6317da40006f6bc2480c6781999c52d88dde2acf
+</screen>
+      </para>
+    </listitem>
+  </varlistentry>
+</variablelist>
+
+</refsection>
+</refentry>