1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-13 16:15:30 +00:00
nixpkgs/nixos/doc/manual/man-nixos-option.xml

135 lines
3.3 KiB
XML
Raw Normal View History

<refentry xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
2018-05-02 00:57:09 +01:00
<refmeta>
<refentrytitle><command>nixos-option</command>
</refentrytitle><manvolnum>8</manvolnum>
<refmiscinfo class="source">NixOS</refmiscinfo>
2018-05-02 00:57:09 +01:00
<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> -->
</refmeta>
<refnamediv>
<refname><command>nixos-option</command></refname>
<refpurpose>inspect a NixOS configuration</refpurpose>
2018-05-02 00:57:09 +01:00
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>nixos-option</command>
<arg>
<group choice='req'>
<arg choice='plain'><option>-r</option></arg>
<arg choice='plain'><option>--recursive</option></arg>
</group>
2018-05-02 00:57:09 +01:00
</arg>
<arg>
<option>-I</option> <replaceable>path</replaceable>
2018-05-02 00:57:09 +01:00
</arg>
<arg>
<replaceable>option.name</replaceable>
2018-05-02 00:57:09 +01:00
</arg>
</cmdsynopsis>
2018-05-02 00:57:09 +01:00
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This command evaluates the configuration specified in
<filename>/etc/nixos/configuration.nix</filename> and returns the properties
of the option name given as argument.
2018-05-02 00:57:09 +01:00
</para>
<para>
When the option name is not an option, the command prints the list of
attributes contained in the attribute set.
2018-05-02 00:57:09 +01:00
</para>
</refsection>
<refsection>
<title>Options</title>
<para>
This command accepts the following options:
</para>
<variablelist>
<varlistentry>
<term><option>-r</option></term>
<term><option>--recursive</option></term>
2017-08-03 22:42:08 +01:00
<listitem>
2018-05-02 00:57:09 +01:00
<para>
Print all the values at or below the specified path recursively.
2018-05-02 00:57:09 +01:00
</para>
2017-08-03 22:42:08 +01:00
</listitem>
2018-05-02 00:57:09 +01:00
</varlistentry>
<varlistentry>
<term>
<option>-I</option> <replaceable>path</replaceable>
2018-05-02 00:57:09 +01:00
</term>
2017-08-03 22:42:08 +01:00
<listitem>
2018-05-02 00:57:09 +01:00
<para>
This option is passed to the underlying
<command>nix-instantiate</command> invocation.
2018-05-02 00:57:09 +01:00
</para>
2017-08-03 22:42:08 +01:00
</listitem>
2018-05-02 00:57:09 +01:00
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Environment</title>
<variablelist>
<varlistentry>
<term>
<envar>NIXOS_CONFIG</envar>
2018-05-02 00:57:09 +01:00
</term>
<listitem>
2018-05-02 00:57:09 +01:00
<para>
Path to the main NixOS configuration module. Defaults to
<filename>/etc/nixos/configuration.nix</filename>.
2018-05-02 00:57:09 +01:00
</para>
</listitem>
2018-05-02 00:57:09 +01:00
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Examples</title>
<para>
Investigate option values:
2019-06-17 12:25:50 +01:00
<screen><prompt>$ </prompt>nixos-option boot.loader
This attribute set contains:
generationsDir
grub
initScript
2019-06-17 12:25:50 +01:00
<prompt>$ </prompt>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"
2018-05-02 00:57:09 +01:00
</screen>
</para>
</refsection>
<refsection>
<title>Bugs</title>
<para>
The author listed in the following section is wrong. If there is any other
bug, please report to Nicolas Pierron.
2018-05-02 00:57:09 +01:00
</para>
</refsection>
<refsection>
<title>See also</title>
<para>
<citerefentry>
<refentrytitle>configuration.nix</refentrytitle>
<manvolnum>5</manvolnum>
</citerefentry>
</para>
</refsection>
</refentry>