[Nix-dev] undefined variable 'config', in '/etc/nixos/configuration.nix'

Bryan Murdock bmurdock at gmail.com
Wed Jul 7 20:02:12 CEST 2010


2010/7/7 Lluís Batlle i Rossell <viriketo at gmail.com>:
> On Wed, Jul 07, 2010 at 10:03:36AM -0600, Bryan Murdock wrote:
>> I'm using nixos-0.1pre22440-i686-linux.iso to install nix as a
>> VirtualBox guest.  At the step where I run nixos-install it exits
>> early with this output:
>>
>> building the system configuration...
>> error: undefined variable 'config', in '/etc/nixos/configuration.nix'
>>
>> The file /etc/nixos/configuration.nix is this:
>
> You should look at /mnt/etc/nixos/configuration.nix
>
> /etc/nixos/configuration.nix defines the nixos configuration of the system in
> the CD.
>
> /mnt/etc/nixos/configuration.nix defines the system you want in your hard disk
> (mounted at /mnt)
>
> nixos-install uses some 'chroot /mnt ...' operations, so you may get messages
> telling about /etc/nixos/configuration.nix, but you should understand that they
> refer to /mnt. As you install a nixos (nixos-install), and not rebuild the CD
> nixos (nixos-rebuild), I'm quite sure your trouble refers to
> /mnt/etc/nixos/configuration.nix.
>
> Regards,
> Lluís

I think you are right, the error messages should say /mnt/etc/..., not
/etc/...  I added the {config, pkgs, ...}: to the top of my
/mnt/etc/nixos/configuration.nix (nixos-hardware-scan didn't put that
in there for me) and now the install is progressing further.

Bryan



More information about the nix-dev mailing list