d1fa5dd85c
In general the man pages do not care what OS and manual they are shipped with, so they don't get to choose the names of them. We were tempted to do so, as we had inconsistently chosen OS names for the mandoc and man-db/groff implementations. Since this has been rectified since, we can just drop this boilerplate from the man pages.
86 lines
2.1 KiB
Groff
86 lines
2.1 KiB
Groff
.Dd January 1, 1980
|
|
.Dt nixos-version 8
|
|
.Os
|
|
.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
|