[Nix-dev] Understanding NIX_PATH
Eike
eike at eknet.org
Sat Jun 13 15:14:03 CEST 2015
Yes, I know. My question is more why does it exist by default and is set
to some non-existent path? I didn't tweak this variable myself. Does it
maybe only apply to non-NixOS systems that use Nix?
Thanks
Eike
Luca Bruno <lethalman88 at gmail.com> writes:
> It's just there if someone wants to use that path.
>
> On Sat, Jun 13, 2015 at 1:58 PM, Eike <eike at eknet.org> wrote:
>
>>
>> oh how embarrassing. I didn't see this although looking at it for sooo
>> long.
>>
>> One thing I don't understand: what does 'nixpkgs=/etc/nixos/nixpkgs'
>> mean in NIX_PATH? It doesn't exist on my system, so I gues it is
>> referring to something…?
>>
>> thank you very much!
>> Eike
>>
>> Luca Bruno <lethalman88 at gmail.com> writes:
>>
>> > I think because you are using the nixpkgs-unstable instead of
>> > nixos-unstable, hence the NIX_PATH is wrong. Does /nix/var/nix/
>> > profiles/per-user/root/channels/nixos/nixpkgs/nixos exist? If not, your
>> > NIX_PATH is wrong.
>> >
>> > On Sat, Jun 13, 2015 at 12:54 PM, Eike <eike at eknet.org> wrote:
>> >
>> >>
>> >> Hello all,
>> >>
>> >> I just encountered a problem that I cannot figure out myself. I switched
>> >> from the 14.12 channel to the unstable channel (in NixOS) and when doing
>> >> nixos-rebuild build I get the following:
>> >>
>> >> # nix-channel --list
>> >> nixos https://nixos.org/channels/nixpkgs-unstable
>> >>
>> >> # nixos-rebuild build
>> >> building Nix...
>> >> error: file ‘nixpkgs/nixos’ was not found in the Nix search path
>> (add
>> >> it using $NIX_PATH or -I)
>> >> error: file ‘nixpkgs/nixos’ was not found in the Nix search path
>> (add
>> >> it using $NIX_PATH or -I)
>> >> error: file ‘nixpkgs’ was not found in the Nix search path (add it
>> >> using $NIX_PATH or -I)
>> >> /tmp/nixos-rebuild.lH7Hoj/nix
>> >> building the system configuration...
>> >> error: file ‘nixpkgs/nixos’ was not found in the Nix search path
>> (add
>> >> it using $NIX_PATH or -I)
>> >>
>> >> My nix env is this:
>> >>
>> >> # env |grep -i ^nix
>> >> NIX_PROFILES=/run/current-system/sw /nix/var/nix/profiles/default
>> >> /root/.nix-profile
>> >> NIX_CONF_DIR=/etc/nix
>> >>
>> >>
>> NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos:nixpkgs=/etc/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix
>> >> NIX_OTHER_STORES=/run/nix/remote-stores/*/nix
>> >> NIXPKGS_CONFIG=/etc/nix/nixpkgs-config.nix
>> >> NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/root
>> >>
>> >> I can see that the 'nixpkgs=/etc/nixos/nixpkgs' part in NIX_PATH points
>> >> to a non-existing thing. But it always did so and the command works in
>> >> the same env if the 14.12 channel is active.
>> >>
>> >> I always wondered about why is nixpkgs pointing to a non-existing thing?
>> >>
>> >> And why is the unstable channel not building for me?
>> >>
>> >> Thank you and kind regards
>> >> Eike
>> >> _______________________________________________
>> >> nix-dev mailing list
>> >> nix-dev at lists.science.uu.nl
>> >> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>> >>
>>
>> --
>> gpg: AD7AC35E
>> finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
>>
--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
More information about the nix-dev
mailing list