News for hackers. Stuff that matters.
Re:Nix is the ultimate DevOps toolkit by root_axis on Friday April 09, 2021 @08:26AM (#26749655)
I love nix as a concept, but in my experience it isn't practical on systems without a ton of memory. I regularly get build errors due to oom errors.
Re:Nix is the ultimate DevOps toolkit by trulyrandom on Friday April 09, 2021 @09:46AM (#26750496)
Yeah, it's clear that Nix has not been optimized to run on resource constrained devices. I run NixOS on a Raspberry Pi with 1GB of RAM and had to enable swap to prevent Nix from running into OOM situations. Any system with more memory than 1GB is usually fine in my experience though.
Re:Nix is the ultimate DevOps toolkit by ris on Friday April 09, 2021 @03:39PM (#26755111)
To run it on systems with low memory, I suggest performing any custom builds on a separate machine.

In "normal" circumstances you don't generally have to do any builds at all - (almost?) everything should come from the binary cache. To be doing all these rebuilds it sounds like you're customizing packages, which is already something other distributions don't tend to let you do at all.

Re:Nix is the ultimate DevOps toolkit by kaba0 on Friday April 09, 2021 @09:06AM (#26750040)
That’s strange, are you actually compiling packages or the evaluation itself ooms? Because if the former, you may help it by limiting concurrent builds.
Re:Nix is the ultimate DevOps toolkit by raxi on Friday April 09, 2021 @02:50PM (#26754474)
Evaluating/compiling packages is not greedy.

Memory is eaten by lazy evaluation of NixOS modules.

It can be optimized, but it is not a low-hanging fruit. It is still waiting for its hero. I'd compare it with creating the V8 for JavaScript.

Re:Nix is the ultimate DevOps toolkit by taktoa on Friday April 09, 2021 @04:31PM (#26755728)
you're probably mistakenly using nix-env -i, rather than nix-env -iA
Re:Nix is the ultimate DevOps toolkit by root_axis on Saturday April 10, 2021 @01:25PM (#26763202)
I think you're right! Thanks for this tip.