[Nix-dev] NixOS on embedded systems

Lluís Batlle i Rossell viriketo at gmail.com
Sat Jul 17 14:33:07 CEST 2010


On Sat, Jul 17, 2010 at 03:20:40PM +0300, Evgeny Egorochkin wrote:
> On Saturday 17 July 2010 14:27:36 Lluís Batlle i Rossell wrote:
> > Hello,
> > 
> > we talked about the defeat of putting Nixos into a small system. For
> > example, a router (12MB of RAM, 8MB of flash, for example, where OpenWrt
> > works fine), or the Ben Nanonote (2GB of flash, 32MB of RAM).
> > 
> > I have the idea that NixOS expressions usually don't need a compiler, but
> > NixOS relies on the nixpkgs expressions that need a compiler. So we could
> > use in NixOS not the nixpkgs stdenv to create some text files, but a
> > simpler stdenv without compilers.
> > Then, as NixOS does need nixpkgs attributes, we could try to have a tool
> > generating a nixpkgs attribute tree that would be composed not of
> > "stdenv.mkDerivation" derivations, but of "fetchurl-like" derivations that
> > would grab the files as stated in MANIFESTs nowadays.
> 
> My anecdotal evidence suggests that gcc is not the only problem. I saw nixos-
> rebuild fail with out of memory error in an OpenVZ container with 256M of RAM 
> while it was evaluating the config.

The amount of memory needed for nix evaluation, for the light nixpkgs I
described with fetchurl-like attributes, can be much much less.

So that kind of light nixpkgs can be useful also in that OpenVZ container.

If you think you can build your system, you could instantiate the nixos system
drv files in another computer, transfer them to your OpenVZ contained NixOS, and
there only realise the drv files.

Regards,
Lluís.



More information about the nix-dev mailing list