1<refentry xmlns="http://docbook.org/ns/docbook"
2 xmlns:xlink="http://www.w3.org/1999/xlink"
3 xmlns:xi="http://www.w3.org/2001/XInclude">
4
5<refmeta>
6 <refentrytitle><command>nixos-option</command></refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="source">NixOS</refmiscinfo>
9 <!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> -->
10</refmeta>
11
12<refnamediv>
13 <refname><command>nixos-option</command></refname>
14 <refpurpose>inspect a NixOS configuration</refpurpose>
15</refnamediv>
16
17<refsynopsisdiv>
18 <cmdsynopsis>
19 <command>nixos-option</command>
20 <arg choice='plain'><replaceable>option.name</replaceable></arg>
21 </cmdsynopsis>
22</refsynopsisdiv>
23
24
25<refsection><title>Description</title>
26
27<para>This command evaluates the configuration specified in
28<filename>/etc/nixos/configuration.nix</filename> and returns the properties
29of the option name given as argument.</para>
30
31<para>When the option name is not an option, the command prints the list of
32attributes contained in the attribute set.</para>
33
34</refsection>
35
36<refsection><title>Environment</title>
37
38<variablelist>
39
40 <varlistentry>
41 <term><envar>NIXOS_CONFIG</envar></term>
42 <listitem>
43 <para>Path to the main NixOS configuration module. Defaults to
44 <filename>/etc/nixos/configuration.nix</filename>.</para>
45 </listitem>
46 </varlistentry>
47
48</variablelist>
49
50</refsection>
51
52
53<refsection><title>Examples</title>
54
55<para>Investigate option values:
56
57<screen>$ nixos-option boot.loader
58This attribute set contains:
59generationsDir
60grub
61initScript
62
63$ nixos-option boot.loader.grub.enable
64Value:
65true
66
67Default:
68true
69
70Description:
71Whether to enable the GNU GRUB boot loader.
72
73Declared by:
74 "/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix"
75
76Defined by:
77 "/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix"
78</screen></para>
79
80</refsection>
81
82<refsection><title>Bugs</title>
83
84<para>The author listed in the following section is wrong. If there is any
85 other bug, please report to Nicolas Pierron.</para>
86
87</refsection>
88
89
90</refentry>