nixpkgs/nixos/doc/manual/manpages/nixos-option.8
pennae 0c601b12bf nixos/manual: translate manpages to mdoc
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).
2023-02-03 02:23:07 +01:00

94 lines
1.8 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-option \&8 "NixOS System Manager's Manual"
.el .Dt nixos-option 8
.Os NixOS
.Sh NAME
.Nm nixos-option
.Nd inspect a NixOS configuration
.
.
.
.Sh SYNOPSIS
.Nm
.Op Fl r | -recursive
.Op Fl I Ar path
.Ar option.name
.
.
.
.Sh DESCRIPTION
This command evaluates the configuration specified in
.Pa /etc/nixos/configuration.nix
and returns the properties of the option name given as argument.
.
.Pp
When the option name is not an option, the command prints the list of attributes
contained in the attribute set.
.
.
.
.Sh OPTIONS
.Bl -tag -width indent
.It Fl r , -recursive
Print all the values at or below the specified path recursively.
.
.It Fl I Ar path
This option is passed to the underlying
.Xr nix-instantiate 1
invocation.
.El
.
.
.
.Sh ENVIRONMENT
.Bl -tag -width indent
.It Ev NIXOS_CONFIG
Path to the main NixOS configuration module. Defaults to
.Pa /etc/nixos/configuration.nix Ns
\&.
.El
.
.
.
.Sh EXAMPLES
Investigate option values:
.Bd -literal -offset indent
$ nixos-option boot.loader
This attribute set contains:
generationsDir
grub
initScript
$ nixos-option boot.loader.grub.enable
Value:
true
Default:
true
Description:
Whether to enable the GNU GRUB boot loader.
Declared by:
"/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix"
Defined by:
"/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix"
.Ed
.
.
.
.Sh SEE ALSO
.Xr configuration.nix 5
.
.
.
.Sh AUTHORS
.An -nosplit
.An Nicolas Pierron
and
.An the Nixpkgs/NixOS contributors