From 5075cbe6967324123e7a9fc38fcd35371f2b91df Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 13 Apr 2015 12:20:58 +0200 Subject: [PATCH] nixos: Put root's channels to the end of NIX_PATH. My original reason to put it at the beginning of NIX_PATH was to allow shipping a particular version with a channel. But in order to do that, we can still let the channel expression ship with a custom version of nixpkgs by something like and the builder of the channel could also rewrite self-references. So the inconvenience is now shifted towards the maintainer of the channel rather than the user (which isn't nice, but better err on the side of the developer rather than on the user), because as @edolstra pointed out: Having the channels of root at the beginning of NIX_PATH could have unintended side-effects if there a channel called nixpkgs. Signed-off-by: aszlig --- nixos/modules/programs/environment.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix index 1a211b8c84fc..dce757ceb623 100644 --- a/nixos/modules/programs/environment.nix +++ b/nixos/modules/programs/environment.nix @@ -25,10 +25,10 @@ in environment.sessionVariables = { NIX_PATH = - [ "/nix/var/nix/profiles/per-user/root/channels" - "/nix/var/nix/profiles/per-user/root/channels/nixos" + [ "/nix/var/nix/profiles/per-user/root/channels/nixos" "nixpkgs=/etc/nixos/nixpkgs" "nixos-config=/etc/nixos/configuration.nix" + "/nix/var/nix/profiles/per-user/root/channels" ]; };