diff options
author | Graham Christensen <graham@grahamc.com> | 2018-05-01 07:19:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 07:19:38 -0400 |
commit | 5d03cce7ed7c2f7a5c5d66dfd8ff00ad89bcd3d5 (patch) | |
tree | 6927f2b6c9acc03bc2afcd78103e5234493ab600 /nixos | |
parent | 6f76d907c8d42ee017dcbb905eb3cb72fa2d6710 (diff) | |
parent | 8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b (diff) |
Merge pull request #38351 from grahamc/user-channels
Add user channels to the default nix path
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/release-notes/rl-1809.xml | 15 | ||||
-rw-r--r-- | nixos/modules/services/misc/nix-daemon.nix | 4 |
2 files changed, 16 insertions, 3 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1809.xml b/nixos/doc/manual/release-notes/rl-1809.xml index ce06a23beba0..0743a05ba38c 100644 --- a/nixos/doc/manual/release-notes/rl-1809.xml +++ b/nixos/doc/manual/release-notes/rl-1809.xml @@ -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 <mychannel></code>. </para> + <para>For example</para> + <programlisting> +$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgsunstable +$ nix-channel --update +$ nix-build '<nixpkgsunstable>' -A gitFull +$ nix run -f '<nixpkgsunstable>' gitFull +$ nix-instantiate -E '(import <nixpkgsunstable> {}).gitFull' +</programlisting> </listitem> - </itemizedlist> </section> diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix index f2d34560a718..277ae9e292ce 100644 --- a/nixos/modules/services/misc/nix-daemon.nix +++ b/nixos/modules/services/misc/nix-daemon.nix @@ -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" ]; |