[Nix-dev] NixOS on embedded systems
Evgeny Egorochkin
phreedom.stdin at gmail.com
Sat Jul 17 17:56:58 CEST 2010
On Saturday 17 July 2010 15:33:07 Lluís Batlle i Rossell wrote:
> 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.
What you describe sounds more like a disnix case ;)
--
Evgeny
More information about the nix-dev
mailing list