1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-01 00:39:45 +01:00
This commit is contained in:
rycee 2024-03-14 21:34:28 +00:00
parent b7a7c18fb7
commit 8d0834dfbf
2 changed files with 21 additions and 6 deletions

View file

@ -33,7 +33,7 @@
</div> </div>
<hr /> <hr />
</div> </div>
<div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="preface"> <a href="index.xhtml#preface">Preface</a> </span></dt><dt> <span class="part"> <a href="index.xhtml#ch-installation">Installing Home Manager</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-install-standalone">Standalone installation</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-install-nixos-module">NixOS module</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-install-nix-darwin-module">nix-darwin module</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-usage">Using Home Manager</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-usage-configuration">Configuration Example</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-rollbacks">Rollbacks</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-dotfiles">Keeping your ~ safe from harm</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-graphical">Graphical services</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-updating">Updating</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-nix-flakes">Nix Flakes</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-flakes-prerequisites">Prerequisites</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-standalone">Standalone setup</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-nixos-module">NixOS module</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-nix-darwin-module">nix-darwin module</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-writing-modules">Writing Home Manager Modules</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-option-types">Option Types</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-contributing">Contributing</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-contrib-getting-started">Getting started</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines">Guidelines</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-news">News</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-tests">Tests</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-3rd-party">Third-Party Tools and Extensions</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-3rd-party-module-collections">Module Collections</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-faq">Frequently Asked Questions (FAQ)</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#_why_is_there_a_collision_error_when_switching_generation">Why is there a collision error when switching generation?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_are_the_session_variables_not_set">Why are the session variables not set?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_to_set_up_a_configuration_for_multiple_users_machines">How to set up a configuration for multiple users/machines?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal">Why do I get an error message about <code class="literal">ca.desrt.dconf</code> or <code class="literal">dconf.service</code>?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_install_packages_from_nixpkgs_unstable">How do I install packages from Nixpkgs unstable?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_override_the_package_used_by_a_module">How do I override the package used by a module?</a> </span></dt></dl></dd><dt> <span class="appendix"> <a href="options.xhtml">A. Home Manager Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="nixos-options.xhtml">B. NixOS Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="nix-darwin-options.xhtml">C. nix-darwin Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="release-notes.xhtml">D. Release Notes</a> </span></dt> </dl></div> <div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="preface"> <a href="index.xhtml#preface">Preface</a> </span></dt><dt> <span class="part"> <a href="index.xhtml#ch-installation">Installing Home Manager</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-install-standalone">Standalone installation</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-install-nixos-module">NixOS module</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-install-nix-darwin-module">nix-darwin module</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-usage">Using Home Manager</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-usage-configuration">Configuration Example</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-rollbacks">Rollbacks</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-dotfiles">Keeping your ~ safe from harm</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-usage-graphical">Graphical services</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-updating">Updating</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-nix-flakes">Nix Flakes</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-flakes-prerequisites">Prerequisites</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-standalone">Standalone setup</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-nixos-module">NixOS module</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-flakes-nix-darwin-module">nix-darwin module</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-writing-modules">Writing Home Manager Modules</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-option-types">Option Types</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-contributing">Contributing</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-contrib-getting-started">Getting started</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-guidelines">Guidelines</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-news">News</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#sec-tests">Tests</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-3rd-party">Third-Party Tools and Extensions</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#sec-3rd-party-module-collections">Module Collections</a> </span></dt></dl></dd><dt> <span class="part"> <a href="index.xhtml#ch-faq">Frequently Asked Questions (FAQ)</a> </span></dt><dd><dl><dt> <span class="section"> <a href="index.xhtml#_why_is_there_a_collision_error_when_switching_generation">Why is there a collision error when switching generation?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_are_the_session_variables_not_set">Why are the session variables not set?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_to_set_up_a_configuration_for_multiple_users_machines">How to set up a configuration for multiple users/machines?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal">Why do I get an error message about <code class="literal">ca.desrt.dconf</code> or <code class="literal">dconf.service</code>?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_install_packages_from_nixpkgs_unstable">How do I install packages from Nixpkgs unstable?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_change_the_package_used_by_a_module">How do I change the package used by a module?</a> </span></dt></dl></dd><dt> <span class="appendix"> <a href="options.xhtml">A. Home Manager Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="nixos-options.xhtml">B. NixOS Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="nix-darwin-options.xhtml">C. nix-darwin Configuration Options</a> </span></dt><dt> <span class="appendix"> <a href="release-notes.xhtml">D. Release Notes</a> </span></dt> </dl></div>
<div class="preface"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="preface"></a>Preface </h1> </div> </div></div><p>This manual will eventually describe how to install, use, and extend Home <div class="preface"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="preface"></a>Preface </h1> </div> </div></div><p>This manual will eventually describe how to install, use, and extend Home
Manager.</p><p>If you encounter problems then please reach out on the IRC channel Manager.</p><p>If you encounter problems then please reach out on the IRC channel
<a class="link" href="https://webchat.oftc.net/?channels=home-manager" target="_top">#home-manager</a> <a class="link" href="https://webchat.oftc.net/?channels=home-manager" target="_top">#home-manager</a>
@ -830,7 +830,7 @@ are encouraged to create a PR that expands this chapter.</p><div class="toc"> <p
modules</a></p><p>A collection of modules maintained by Anselm Schüler.</p></li><li class="listitem"><p><a class="link" href="https://github.com/danth/stylix/" target="_top">Stylix — System-wide colorscheming and modules</a></p><p>A collection of modules maintained by Anselm Schüler.</p></li><li class="listitem"><p><a class="link" href="https://github.com/danth/stylix/" target="_top">Stylix — System-wide colorscheming and
typography</a></p><p>Configure your applications to get coherent color scheme and font.</p></li></ul></div> typography</a></p><p>Configure your applications to get coherent color scheme and font.</p></li></ul></div>
</div> </div>
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-faq"></a>Frequently Asked Questions (FAQ) </h1> </div> </div></div><div class="partintro"><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#_why_is_there_a_collision_error_when_switching_generation">Why is there a collision error when switching generation?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_are_the_session_variables_not_set">Why are the session variables not set?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_to_set_up_a_configuration_for_multiple_users_machines">How to set up a configuration for multiple users/machines?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal">Why do I get an error message about <code class="literal">ca.desrt.dconf</code> or <code class="literal">dconf.service</code>?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_install_packages_from_nixpkgs_unstable">How do I install packages from Nixpkgs unstable?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_override_the_package_used_by_a_module">How do I override the package used by a module?</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_why_is_there_a_collision_error_when_switching_generation"></a>Why is there a collision error when switching generation? </h2> </div> </div></div><p>Home Manager currently installs packages into the user environment, </div><div class="part"> <div class="titlepage"> <div> <div> <h1 class="title" > <a id="ch-faq"></a>Frequently Asked Questions (FAQ) </h1> </div> </div></div><div class="partintro"><div class="toc"> <p><strong>Table of Contents</strong></p> <dl class="toc"> <dt> <span class="section"> <a href="index.xhtml#_why_is_there_a_collision_error_when_switching_generation">Why is there a collision error when switching generation?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_are_the_session_variables_not_set">Why are the session variables not set?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_to_set_up_a_configuration_for_multiple_users_machines">How to set up a configuration for multiple users/machines?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal">Why do I get an error message about <code class="literal">ca.desrt.dconf</code> or <code class="literal">dconf.service</code>?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_install_packages_from_nixpkgs_unstable">How do I install packages from Nixpkgs unstable?</a> </span></dt><dt> <span class="section"> <a href="index.xhtml#_how_do_i_change_the_package_used_by_a_module">How do I change the package used by a module?</a> </span></dt> </dl></div></div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_why_is_there_a_collision_error_when_switching_generation"></a>Why is there a collision error when switching generation? </h2> </div> </div></div><p>Home Manager currently installs packages into the user environment,
precisely as if the packages were installed through <code class="literal">nix-env --install</code>. precisely as if the packages were installed through <code class="literal">nix-env --install</code>.
This means that you will get a collision error if your Home Manager This means that you will get a collision error if your Home Manager
configuration attempts to install a package that you already have configuration attempts to install a package that you already have
@ -914,12 +914,27 @@ in
$ nix-channel --update $ nix-channel --update
</code></pre><p>Note, the package will not be affected by any package overrides, </code></pre><p>Note, the package will not be affected by any package overrides,
overlays, etc.</p> overlays, etc.</p>
</div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_how_do_i_override_the_package_used_by_a_module"></a>How do I override the package used by a module? </h2> </div> </div></div><p>By default Home Manager will install the package provided by your chosen </div><div class="section"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"> <a id="_how_do_i_change_the_package_used_by_a_module"></a>How do I change the package used by a module? </h2> </div> </div></div><p>By default Home Manager will install the package provided by your chosen
<code class="literal">nixpkgs</code> channel but occasionally you might end up needing to change <code class="literal">nixpkgs</code> channel but occasionally you might end up needing to change
this package. This can typically be done in two ways.</p><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>If the module provides a <code class="literal">package</code> option, such as this package. This can typically be done in two ways.</p><div class="orderedlist"><ol class="orderedlist " type="1"><li class="listitem"><p>If the module provides a <code class="literal">package</code> option, such as
<code class="literal">programs.beets.package</code>, then this is the recommended way to <code class="literal">programs.beets.package</code>, then this is the recommended way to
perform the override. For example,</p><pre><code class="programlisting nix">programs.beets.package = pkgs.beets.override { enableCheck = true; }; perform the change. For example,</p><pre><code class="programlisting nix">programs.beets.package = pkgs.beets.override { pluginOverrides = { beatport.enable = false; }; };
</code></pre></li><li class="listitem"><p>If no <code class="literal">package</code> option is available then you can typically override </code></pre><p>See <a class="link" href="https://nixos.org/guides/nix-pills/nixpkgs-overriding-packages.html" target="_top">Nix pill 17</a>
for more information on package overrides. Alternatively, if you want
to use the <code class="literal">beets</code> package from Nixpkgs unstable, then a configuration like</p><pre><code class="programlisting nix">{ pkgs, config, ... }:
let
pkgsUnstable = import &lt;nixpkgs-unstable&gt; {};
in
{
programs.beets.package = pkgsUnstable.beets;
# …
}
</code></pre><p>should work OK.</p></li><li class="listitem"><p>If no <code class="literal">package</code> option is available then you can typically change
the relevant package using an the relevant package using an
<a class="link" href="https://nixos.org/nixpkgs/manual/#chap-overlays" target="_top">overlay</a>.</p><p>For example, if you want to use the <code class="literal">programs.skim</code> module but use <a class="link" href="https://nixos.org/nixpkgs/manual/#chap-overlays" target="_top">overlay</a>.</p><p>For example, if you want to use the <code class="literal">programs.skim</code> module but use
the <code class="literal">skim</code> package from Nixpkgs unstable, then a configuration like</p><pre><code class="programlisting nix">{ pkgs, config, ... }: the <code class="literal">skim</code> package from Nixpkgs unstable, then a configuration like</p><pre><code class="programlisting nix">{ pkgs, config, ... }:

View file

@ -14187,7 +14187,7 @@ package</p>
<code class="literal">pkgs.beets</code></p> <code class="literal">pkgs.beets</code></p>
<p><span class="emphasis"><em>Example:</em></span> <p><span class="emphasis"><em>Example:</em></span>
<code class="literal">(pkgs.beets.override { enableCheck = true; })</code></p> <code class="literal">(pkgs.beets.override { pluginOverrides = { beatport.enable = false; }; })</code></p>
<p><span class="emphasis"><em>Declared by:</em></span></p> <p><span class="emphasis"><em>Declared by:</em></span></p>
<table border="0" summary="Simple list" class="simplelist"> <table border="0" summary="Simple list" class="simplelist">