1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-11 05:39:44 +01:00
This commit is contained in:
ncfavier 2023-01-17 09:36:17 +00:00
parent effa21cfbe
commit 6ec883e4c6

View file

@ -530,7 +530,7 @@ Builds a GVariant variant which contains the value of a GVariant element.
Builds a GVariant dictionary entry containing the given list of elements, where each element is a GVariant value. Builds a GVariant dictionary entry containing the given list of elements, where each element is a GVariant value.
</dd></dl></div></dd></dl></div></div></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ch-contributing"></a>Chapter 5. Contributing</h1></div></div></div><p>Contributions to Home Manager are very welcome. To make the process as smooth as possible for both you and the Home Manager maintainers we provide some guidelines that we ask you to follow. See <a class="xref" href="index.html#sec-contrib-getting-started" title="5.1. Getting started">Section 5.1, “Getting started”</a> for information on how to set up a suitable development environment and <a class="xref" href="index.html#sec-guidelines" title="5.2. Guidelines">Section 5.2, “Guidelines”</a> for the actual guidelines.</p><p>This text is mainly directed at those who would like to make code contributions to Home Manager. If you just want to report a bug then first look among the already <a class="link" href="https://github.com/nix-community/home-manager/issues" target="_top">open issues</a>, if you find one matching yours then feel free to comment on it to add any additional information you may have. If no matching issue exists then go to the <a class="link" href="https://github.com/nix-community/home-manager/issues/new" target="_top">new issue</a> page and write a description of your problem. Include as much information as you can, ideally also include relevant excerpts from your Home Manager configuration.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sec-contrib-getting-started"></a>5.1. Getting started</h2></div></div></div><p>If you have not previously forked Home Manager then you need to do that first. Have a look at GitHubs <a class="link" href="https://help.github.com/articles/fork-a-repo/" target="_top">Fork a repo</a> for instructions on how to do this.</p><p>Once you have a fork of Home Manager you should create a branch starting at the most recent <code class="literal">master</code> branch. Give your branch a reasonably descriptive name. Commit your changes to this branch and when you are happy with the result and it fulfills <a class="xref" href="index.html#sec-guidelines" title="5.2. Guidelines">Section 5.2, “Guidelines”</a> then push the branch to GitHub and <a class="link" href="https://help.github.com/articles/creating-a-pull-request/" target="_top">create a pull request</a>.</p><p>Assuming your clone is at <code class="literal">$HOME/devel/home-manager</code> then you can make the <code class="literal">home-manager</code> command use it by either</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p class="simpara"> </dd></dl></div></dd></dl></div></div></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a id="ch-contributing"></a>Chapter 5. Contributing</h1></div></div></div><p>Contributions to Home Manager are very welcome. To make the process as smooth as possible for both you and the Home Manager maintainers we provide some guidelines that we ask you to follow. See <a class="xref" href="index.html#sec-contrib-getting-started" title="5.1. Getting started">Section 5.1, “Getting started”</a> for information on how to set up a suitable development environment and <a class="xref" href="index.html#sec-guidelines" title="5.2. Guidelines">Section 5.2, “Guidelines”</a> for the actual guidelines.</p><p>This text is mainly directed at those who would like to make code contributions to Home Manager. If you just want to report a bug then first look among the already <a class="link" href="https://github.com/nix-community/home-manager/issues" target="_top">open issues</a>, if you find one matching yours then feel free to comment on it to add any additional information you may have. If no matching issue exists then go to the <a class="link" href="https://github.com/nix-community/home-manager/issues/new" target="_top">new issue</a> page and write a description of your problem. Include as much information as you can, ideally also include relevant excerpts from your Home Manager configuration.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sec-contrib-getting-started"></a>5.1. Getting started</h2></div></div></div><p>If you have not previously forked Home Manager then you need to do that first. Have a look at GitHubs <a class="link" href="https://help.github.com/articles/fork-a-repo/" target="_top">Fork a repo</a> for instructions on how to do this.</p><p>Once you have a fork of Home Manager you should create a branch starting at the most recent <code class="literal">master</code> branch. Give your branch a reasonably descriptive name. Commit your changes to this branch and when you are happy with the result and it fulfills <a class="xref" href="index.html#sec-guidelines" title="5.2. Guidelines">Section 5.2, “Guidelines”</a> then push the branch to GitHub and <a class="link" href="https://help.github.com/articles/creating-a-pull-request/" target="_top">create a pull request</a>.</p><p>Assuming your clone is at <code class="literal">$HOME/devel/home-manager</code> then you can make the <code class="literal">home-manager</code> command use it by either</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p class="simpara">
overriding the default path by using the <code class="literal">-I</code> command line option: overriding the default path by using the <code class="literal">-I</code> command line option:
</p><pre class="programlisting console">$ home-manager -I home-manager=$HOME/devel/home-manager</pre><p class="simpara">or</p></li><li class="listitem"><p class="simpara"> </p><pre class="programlisting console">$ home-manager -I home-manager=$HOME/devel/home-manager</pre><p class="simpara">or, if using <a class="link" href="index.html#sec-flakes-standalone" title="3.2. Standalone setup">flakes</a>:</p><pre class="programlisting console">$ home-manager --override-input home-manager ~/devel/home-manager</pre><p class="simpara">or</p></li><li class="listitem"><p class="simpara">
changing the default path by ensuring your configuration includes changing the default path by ensuring your configuration includes
</p><pre class="programlisting nix">programs.home-manager.enable = true; </p><pre class="programlisting nix">programs.home-manager.enable = true;
programs.home-manager.path = "$HOME/devel/home-manager";</pre><p class="simpara">and running <code class="literal">home-manager switch</code> to activate the change. Afterwards, <code class="literal">home-manager build</code> and <code class="literal">home-manager switch</code> will use your cloned repository.</p></li></ol></div><p>The first option is good if you only temporarily want to use your clone.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sec-guidelines"></a>5.2. Guidelines</h2></div></div></div><p>If your contribution satisfy the following rules then there is a good chance it will be merged without too much trouble. The rules are enforced by the Home Manager maintainers and to a lesser extent the Home Manager CI system.</p><p>If you are uncertain how these rules affect the change you would like to make then feel free to start a discussion in the <a class="link" href="https://webchat.oftc.net/?channels=home-manager" target="_top">#home-manager</a> IRC channel, ideally before you start developing.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="sec-guidelines-back-compat"></a>5.2.1. Maintain backward compatibility</h3></div></div></div><p>Your contribution should not cause another users existing configuration to break unless there is a very good reason and the change should be announced to the user through an <a class="link" href="https://nixos.org/manual/nixos/stable/index.html#sec-assertions" target="_top">assertion</a> or similar.</p><p>Remember that Home Manager is used in many different environments and you should consider how your change may effect others. For example,</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> programs.home-manager.path = "$HOME/devel/home-manager";</pre><p class="simpara">and running <code class="literal">home-manager switch</code> to activate the change. Afterwards, <code class="literal">home-manager build</code> and <code class="literal">home-manager switch</code> will use your cloned repository.</p></li></ol></div><p>The first option is good if you only temporarily want to use your clone.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="sec-guidelines"></a>5.2. Guidelines</h2></div></div></div><p>If your contribution satisfy the following rules then there is a good chance it will be merged without too much trouble. The rules are enforced by the Home Manager maintainers and to a lesser extent the Home Manager CI system.</p><p>If you are uncertain how these rules affect the change you would like to make then feel free to start a discussion in the <a class="link" href="https://webchat.oftc.net/?channels=home-manager" target="_top">#home-manager</a> IRC channel, ideally before you start developing.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="sec-guidelines-back-compat"></a>5.2.1. Maintain backward compatibility</h3></div></div></div><p>Your contribution should not cause another users existing configuration to break unless there is a very good reason and the change should be announced to the user through an <a class="link" href="https://nixos.org/manual/nixos/stable/index.html#sec-assertions" target="_top">assertion</a> or similar.</p><p>Remember that Home Manager is used in many different environments and you should consider how your change may effect others. For example,</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">