NixOS modules: Difference between revisions
imported>Chanbakjsd Update line numbers of links to GitHub |
imported>Milahu clarify modulesPath |
||
Line 53: | Line 53: | ||
<dl> | <dl> | ||
<dt>[[NixOS:config_argument|<code>config</code>]]</dt> | <dt>[[NixOS:config_argument|<code>config</code>]]</dt> | ||
<dd>The configuration of the entire system.</dd> | <dd>The configuration of the entire system.</dd> | ||
<dt><code>options</code></dt> | <dt><code>options</code></dt> | ||
<dd>All option declarations refined with all definition and declaration references.</dd> | <dd>All option declarations refined with all definition and declaration references.</dd> | ||
<dt><code>pkgs</code></dt> | <dt><code>pkgs</code></dt> | ||
<dd>The attribute set extracted from the Nix package collection and enhanced with the <code>nixpkgs.config</code> option.</dd> | <dd>The attribute set extracted from the Nix package collection and enhanced with the <code>nixpkgs.config</code> option.</dd> | ||
<dt><code>modulesPath</code></dt> | <dt><code>modulesPath</code></dt> | ||
<dd>The location of the <code>module</code> directory of NixOS.</dd> | <dd><p>The location of the <code>module</code> directory of NixOS.</p> | ||
<p>Parsed from the first entry in NIX_PATH, for example:<br> | |||
<code>NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix</code><br> | |||
→ <code>modulesPath = /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules</code></p> | |||
<p>note: <code>NIX_PATH</code> is empty when [[Flakes#Using nix flakes with NixOS|Using nix flakes with NixOS]],<br> | |||
and nix will throw <code>undefined variable 'modulesPath'</code></p> | |||
</dd> | |||
</dl> | </dl> | ||