Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user channels to the default nix path #38351

Merged
merged 1 commit into from
May 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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