Skip to content

Commit

Permalink
Merge pull request #38351 from grahamc/user-channels
Browse files Browse the repository at this point in the history
Add user channels to the default nix path
  • Loading branch information
grahamc authored May 1, 2018
2 parents 6f76d90 + 8ab8d9c commit 5d03cce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 13 additions & 2 deletions nixos/doc/manual/release-notes/rl-1809.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,21 @@ has the following highlights: </para>
<itemizedlist>
<listitem>
<para>
TODO
User channels are now in the default <literal>NIX_PATH</literal>,
allowing users to use their personal <command>nix-channel</command>
defined channels in <command>nix-build</command> and
<command>nix-shell</command> commands, as well as in imports like
<code>import &lt;mychannel&gt;</code>.
</para>
<para>For example</para>
<programlisting>
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgsunstable
$ nix-channel --update
$ nix-build '&lt;nixpkgsunstable&gt;' -A gitFull
$ nix run -f '&lt;nixpkgsunstable&gt;' gitFull
$ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
</programlisting>
</listitem>

</itemizedlist>

</section>
Expand Down
4 changes: 3 additions & 1 deletion nixos/modules/services/misc/nix-daemon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ in
nixPath = mkOption {
type = types.listOf types.str;
default =
[ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs"
[
"$HOME/.nix-defexpr/channels"
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs"
"nixos-config=/etc/nixos/configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels"
];
Expand Down

0 comments on commit 5d03cce

Please sign in to comment.