<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"/><title>AppendixC.nix-darwin Module Options</title><linkrel="stylesheet"type="text/css"href="style.css"/><linkrel="stylesheet"type="text/css"href="overrides.css"/><linkrel="stylesheet"type="text/css"href="mono-blue.css"/><scriptsrc="highlight.pack.js"type="text/javascript"></script><scriptsrc="highlight.load.js"type="text/javascript"></script><metaname="generator"content="DocBook XSL Stylesheets V1.79.2"/><linkrel="home"href="index.html"title="Home Manager Manual"/><linkrel="up"href="index.html"title="Home Manager Manual"/><linkrel="prev"href="nixos-options.html"title="AppendixB.NixOS Module Options"/><linkrel="next"href="tools.html"title="AppendixD.Tools"/></head><body><divclass="navheader"><tablewidth="100%"summary="Navigation header"><tr><thcolspan="3"align="center">AppendixC.nix-darwin Module Options</th></tr><tr><tdwidth="20%"align="left"><aaccesskey="p"href="nixos-options.html">Prev</a></td><thwidth="60%"align="center"></th><tdwidth="20%"align="right"><aaccesskey="n"href="tools.html">Next</a></td></tr></table><hr/></div><divclass="appendix"><divclass="titlepage"><div><div><h1class="title"><aid="ch-nix-darwin-options"></a>AppendixC.nix-darwin Module Options</h1></div></div></div><divclass="variablelist"><aid="nix-darwin-options"></a><dlclass="variablelist"><dt><spanclass="term"><aid="nix-darwin-opt-_module.args"></a><aclass="term"href="nix-darwin-options.html#nix-darwin-opt-_module.args"><codeclass="option">_module.args</code></a></span></dt><dd><p>Additional arguments passed to each module in addition to ones
like <codeclass="literal">lib</code>, <codeclass="literal">config</code>,
and <codeclass="literal">pkgs</code>, <codeclass="literal">modulesPath</code>.
This option is also available to all submodules. Submodules do not
inherit args from their parent module, nor do they provide args to
their parent module or sibling submodules. The sole exception to
this is the argument <codeclass="literal">name</code> which is provided by
parent modules to a submodule and contains the attribute name
the submodule is bound to, or a unique generated name if it is
not bound to an attribute.
Some arguments are already passed by default, of which the
following <spanclass="emphasis"><em>cannot</em></span> be changed with this option:
</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem"><p><codeclass="varname">lib</code>: The nixpkgs library.
</p></li><liclass="listitem"><p><codeclass="varname">config</code>: The results of all options after merging the values from all modules together.
</p></li><liclass="listitem"><p><codeclass="varname">options</code>: The options declared in all modules.
</p></li><liclass="listitem"><p><codeclass="varname">specialArgs</code>: The <codeclass="literal">specialArgs</code> argument passed to <codeclass="literal">evalModules</code>.
</p></li><liclass="listitem"><p>All attributes of <codeclass="varname">specialArgs</code>
Whereas option values can generally depend on other option values
thanks to laziness, this does not apply to <codeclass="literal">imports</code>, which
must be computed statically before anything else.
For this reason, callers of the module system can provide <codeclass="literal">specialArgs</code>
which are available during import resolution.
For NixOS, <codeclass="literal">specialArgs</code> includes
<codeclass="varname">modulesPath</code>, which allows you to import
extra modules from the nixpkgs package tree without having to
somehow make the module aware of the location of the
<codeclass="literal">nixpkgs</code> or NixOS directories.
</p><preclass="programlisting">
{ modulesPath, ... }: {
imports = [
(modulesPath + "/profiles/minimal.nix")
];
}
</pre></li></ul></div><p>For NixOS, the default value for this option includes at least this argument:
</p><divclass="itemizedlist"><ulclass="itemizedlist"style="list-style-type: disc; "><liclass="listitem"><p><codeclass="varname">pkgs</code>: The nixpkgs package set according to
the <codeclass="option">nixpkgs.pkgs</code> option.</p></li></ul></div><p>
</p><p><spanclass="emphasis"><em>Type:</em></span> lazy attribute set of raw value</p><p><spanclass="emphasis"><em>Declared by:</em></span></p><tableborder="0"summary="Simple list"class="simplelist"><tr><td><codeclass="filename"><aclass="filename"href="https://github.com/nix-community/home-manager/blob/master/lib/modules.nix#blob-path"target="_top">
</a></code></td></tr></table></dd><dt><spanclass="term"><aid="nix-darwin-opt-home-manager.backupFileExtension"></a><aclass="term"href="nix-darwin-options.html#nix-darwin-opt-home-manager.backupFileExtension"><codeclass="option">home-manager.backupFileExtension</code></a></span></dt><dd><p>On activation move existing files by appending the given
</a></code></td></tr></table></dd><dt><spanclass="term"><aid="nix-darwin-opt-home-manager.extraSpecialArgs"></a><aclass="term"href="nix-darwin-options.html#nix-darwin-opt-home-manager.extraSpecialArgs"><codeclass="option">home-manager.extraSpecialArgs</code></a></span></dt><dd><p>Extra <codeclass="literal">specialArgs</code> passed to Home Manager. This
option can be used to pass additional arguments to all modules.
</a></code></td></tr></table></dd><dt><spanclass="term"><aid="nix-darwin-opt-home-manager.sharedModules"></a><aclass="term"href="nix-darwin-options.html#nix-darwin-opt-home-manager.sharedModules"><codeclass="option">home-manager.sharedModules</code></a></span></dt><dd><p>Extra modules added to all users.
</a></code></td></tr></table></dd><dt><spanclass="term"><aid="nix-darwin-opt-home-manager.useGlobalPkgs"></a><aclass="term"href="nix-darwin-options.html#nix-darwin-opt-home-manager.useGlobalPkgs"><codeclass="option">home-manager.useGlobalPkgs</code></a></span></dt><dd><p>Whether to enable using the system configuration's <codeclass="literal">pkgs</code>
argument in Home Manager. This disables the Home Manager
</a></code></td></tr></table></dd><dt><spanclass="term"><aid="nix-darwin-opt-home-manager.useUserPackages"></a><aclass="term"href="nix-darwin-options.html#nix-darwin-opt-home-manager.useUserPackages"><codeclass="option">home-manager.useUserPackages</code></a></span></dt><dd><p>Whether to enable installation of user packages through the
</a></code></td></tr></table></dd><dt><spanclass="term"><aid="nix-darwin-opt-home-manager.users"></a><aclass="term"href="nix-darwin-options.html#nix-darwin-opt-home-manager.users"><codeclass="option">home-manager.users</code></a></span></dt><dd><p>Per-user Home Manager configuration.
</p><p><spanclass="emphasis"><em>Type:</em></span> attribute set of (Home Manager module)</p><p><spanclass="emphasis"><em>Default:</em></span><codeclass="literal">{ }</code></p><p><spanclass="emphasis"><em>Declared by:</em></span></p><tableborder="0"summary="Simple list"class="simplelist"><tr><td><codeclass="filename"><aclass="filename"href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix#blob-path"target="_top">
</a></code></td></tr></table></dd><dt><spanclass="term"><aid="nix-darwin-opt-home-manager.verbose"></a><aclass="term"href="nix-darwin-options.html#nix-darwin-opt-home-manager.verbose"><codeclass="option">home-manager.verbose</code></a></span></dt><dd><p>Whether to enable verbose output on activation.</p><p><spanclass="emphasis"><em>Type:</em></span> boolean</p><p><spanclass="emphasis"><em>Default:</em></span><codeclass="literal">false</code></p><p><spanclass="emphasis"><em>Example:</em></span><codeclass="literal">true</code></p><p><spanclass="emphasis"><em>Declared by:</em></span></p><tableborder="0"summary="Simple list"class="simplelist"><tr><td><codeclass="filename"><aclass="filename"href="https://github.com/nix-community/home-manager/blob/master/nixos/common.nix#blob-path"target="_top">