at 23.05-pre 3.4 kB view raw
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 <refmeta> 5 <refentrytitle><command>nixos-option</command> 6 </refentrytitle><manvolnum>8</manvolnum> 7 <refmiscinfo class="source">NixOS</refmiscinfo> 8<!-- <refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo> --> 9 </refmeta> 10 <refnamediv> 11 <refname><command>nixos-option</command></refname> 12 <refpurpose>inspect a NixOS configuration</refpurpose> 13 </refnamediv> 14 <refsynopsisdiv> 15 <cmdsynopsis> 16 <command>nixos-option</command> 17 18 <arg> 19 <group choice='req'> 20 <arg choice='plain'><option>-r</option></arg> 21 <arg choice='plain'><option>--recursive</option></arg> 22 </group> 23 </arg> 24 25 <arg> 26 <option>-I</option> <replaceable>path</replaceable> 27 </arg> 28 29 <arg> 30 <replaceable>option.name</replaceable> 31 </arg> 32 </cmdsynopsis> 33 </refsynopsisdiv> 34 <refsection> 35 <title>Description</title> 36 <para> 37 This command evaluates the configuration specified in 38 <filename>/etc/nixos/configuration.nix</filename> and returns the properties 39 of the option name given as argument. 40 </para> 41 <para> 42 When the option name is not an option, the command prints the list of 43 attributes contained in the attribute set. 44 </para> 45 </refsection> 46 <refsection> 47 <title>Options</title> 48 <para> 49 This command accepts the following options: 50 </para> 51 <variablelist> 52 <varlistentry> 53 <term><option>-r</option></term> 54 <term><option>--recursive</option></term> 55 <listitem> 56 <para> 57 Print all the values at or below the specified path recursively. 58 </para> 59 </listitem> 60 </varlistentry> 61 <varlistentry> 62 <term> 63 <option>-I</option> <replaceable>path</replaceable> 64 </term> 65 <listitem> 66 <para> 67 This option is passed to the underlying 68 <command>nix-instantiate</command> invocation. 69 </para> 70 </listitem> 71 </varlistentry> 72 </variablelist> 73 </refsection> 74 <refsection> 75 <title>Environment</title> 76 <variablelist> 77 <varlistentry> 78 <term> 79 <envar>NIXOS_CONFIG</envar> 80 </term> 81 <listitem> 82 <para> 83 Path to the main NixOS configuration module. Defaults to 84 <filename>/etc/nixos/configuration.nix</filename>. 85 </para> 86 </listitem> 87 </varlistentry> 88 </variablelist> 89 </refsection> 90 <refsection> 91 <title>Examples</title> 92 <para> 93 Investigate option values: 94<screen><prompt>$ </prompt>nixos-option boot.loader 95This attribute set contains: 96generationsDir 97grub 98initScript 99 100<prompt>$ </prompt>nixos-option boot.loader.grub.enable 101Value: 102true 103 104Default: 105true 106 107Description: 108Whether to enable the GNU GRUB boot loader. 109 110Declared by: 111 "/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix" 112 113Defined by: 114 "/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/boot/loader/grub/grub.nix" 115</screen> 116 </para> 117 </refsection> 118 <refsection> 119 <title>Bugs</title> 120 <para> 121 The author listed in the following section is wrong. If there is any other 122 bug, please report to Nicolas Pierron. 123 </para> 124 </refsection> 125 <refsection> 126 <title>See also</title> 127 <para> 128 <citerefentry> 129 <refentrytitle>configuration.nix</refentrytitle> 130 <manvolnum>5</manvolnum> 131 </citerefentry> 132 </para> 133 </refsection> 134</refentry>