since we want to move away from docbook and having docbook manpages around is going to block further progress we have to translate the current nixos manpages from docbook it *something* else. mdoc seems the most appropriate choice since markdown can't represent all the things manpages can differentiate with even more extensions. if we ever need html manpages we can render them using troff, like many of the online manpage viewers, or rewrite them again. since we haven't had html manpages for any of these in many years that seems unlikely to happen. unlike most of the recent markdown conversions this comes with a lot of minor rendering changes, mostly in spacing. docbook-xslt creates manual pages in a very different dialect than mdoc (which is used here).
91 lines
2.4 KiB
Groff
91 lines
2.4 KiB
Groff
.Dd January 1, 1980
|
|
.\" nixpkgs groff will use Nixpkgs as the OS in the title by default, taking it from
|
|
.\" doc-default-operating-system. mandoc doesn't have this register set by default,
|
|
.\" so we can use it as a groff/mandoc switch.
|
|
.ie ddoc-default-operating-system .Dt nixos-version \&8 "NixOS System Manager's Manual"
|
|
.el .Dt nixos-version 8
|
|
.Os NixOS
|
|
.Sh NAME
|
|
.Nm nixos-version
|
|
.Nd show the NixOS version
|
|
.
|
|
.
|
|
.
|
|
.Sh SYNOPSIS
|
|
.Nm nixos-version
|
|
.Op Fl -hash
|
|
.Op Fl -revision
|
|
.Op Fl -configuration-revision
|
|
.Op Fl -json
|
|
.
|
|
.
|
|
.
|
|
.Sh DESCRIPTION
|
|
This command shows the version of the currently active NixOS configuration. For example:
|
|
.Bd -literal -offset indent
|
|
$ nixos-version
|
|
16.03.1011.6317da4 (Emu)
|
|
.Ed
|
|
.
|
|
.Pp
|
|
The version consists of the following elements:
|
|
.Bl -tag -width indent
|
|
.It Ql 16.03
|
|
The NixOS release, indicating the year and month in which it was released
|
|
(e.g. March 2016).
|
|
.It Ql 1011
|
|
The number of commits in the Nixpkgs Git repository between the start of the
|
|
release branch and the commit from which this version was built. This ensures
|
|
that NixOS versions are monotonically increasing. It is
|
|
.Ql git
|
|
when the current NixOS configuration was built from a checkout of the Nixpkgs
|
|
Git repository rather than from a NixOS channel.
|
|
.It Ql 6317da4
|
|
The first 7 characters of the commit in the Nixpkgs Git repository from which
|
|
this version was built.
|
|
.It Ql Emu
|
|
The code name of the NixOS release. The first letter of the code name indicates
|
|
that this is the N'th stable NixOS release; for example, Emu is the fifth
|
|
release.
|
|
.El
|
|
.
|
|
.
|
|
.
|
|
.Sh OPTIONS
|
|
.Bl -tag -width indent
|
|
.It Fl -hash , -revision
|
|
Show the full SHA1 hash of the Git commit from which this configuration was
|
|
built, e.g.
|
|
.Bd -literal -offset indent
|
|
$ nixos-version --hash
|
|
6317da40006f6bc2480c6781999c52d88dde2acf
|
|
.Ed
|
|
.
|
|
.It Fl -configuration-revision
|
|
Show the configuration revision if available. This could be the full SHA1 hash
|
|
of the Git commit of the system flake, if you add
|
|
.Bd -literal -offset indent
|
|
{ system.configurationRevision = self.rev or "dirty"; }
|
|
.Ed
|
|
.Pp
|
|
to the
|
|
.Ql modules
|
|
array of your flake.nix system configuration e.g.
|
|
.Bd -literal -offset indent
|
|
$ nixos-version --configuration-revision
|
|
aa314ebd1592f6cdd53cb5bba8bcae97d9323de8
|
|
.Ed
|
|
.
|
|
.It Fl -json
|
|
Print a JSON representation of the versions of NixOS and the top-level
|
|
configuration flake.
|
|
.El
|
|
.
|
|
.
|
|
.
|
|
.Sh AUTHORS
|
|
.An -nosplit
|
|
.An Eelco Dolstra
|
|
and
|
|
.An the Nixpkgs/NixOS contributors
|