about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-04-02 15:02:43 -0400
committerGraham Christensen <graham@grahamc.com>2018-05-01 06:30:31 -0400
commit8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b (patch)
tree47edc8db2056c8421f0ac981f22104915dd60e4c /nixos
parent2f0e2376ac45f8ee7724c35df5c72b11f9e03418 (diff)
downloadnixlib-8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b.tar
nixlib-8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b.tar.gz
nixlib-8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b.tar.bz2
nixlib-8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b.tar.lz
nixlib-8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b.tar.xz
nixlib-8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b.tar.zst
nixlib-8ab8d9cb74e75de46e647a5d77c137f7ef3ebd2b.zip
Add user channels to the default nix path
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/release-notes/rl-1809.xml15
-rw-r--r--nixos/modules/services/misc/nix-daemon.nix4
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 959bd86759b1..111d6636dd81 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 &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>
diff --git a/nixos/modules/services/misc/nix-daemon.nix b/nixos/modules/services/misc/nix-daemon.nix
index ea964fd68e43..d2d29962ce6f 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"
           ];