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: - TODO + User channels are now in the default NIX_PATH, + allowing users to use their personal nix-channel + defined channels in nix-build and + nix-shell commands, as well as in imports like + import <mychannel>. + For example + +$ 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' + - 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" ];