NixVim Installation Issue on VMware

NixVim Installation Issue on VMware

Environment

  • Platform: VMware

  • Resources: 4 cores, 4GB RAM

  • OS: NixOS with flake configuration

Problem Description

I’m testing my NixOS flake configuration and encountered an issue where nixvim gets completely stuck after the flake pulls dependencies.

Symptoms

  • No error messages displayed

  • 100% CPU usage

  • Process appears frozen/unresponsive

Additional Context

My computer has limited memory, so I cannot determine if this is a memory-related issue. However, I don’t believe nixvim build should require significant memory resources.

Configuration Details

  • Configuration only enables nixvim (minimal setup)

  • nix-community cache is enabled (unsure if required)

Workaround Found

The following workaround works successfully:

  1. Temporarily disable nixvim in configuration

  2. Install the base system

  3. Re-enable nixvim after installation

  4. Run nixos-rebuild - works normally

Question

Has anyone encountered a similar issue with nixvim during initial flake installation? Any suggestions for resolving this during the initial install process?

Quadruple that. Or at least double…

Thank you for your response, I am just confused about not being able to complete the system build in one step, and I will test it on another machine again

I do not understand what you mean by “in one step”, and I also do not expect

To work, unless the problem occurs during build rather than evaluation, and in that case using -j1 might already help.

But, with only 4 GiB, the usual offender is already evaluation, not builds. With 8GiB evaluating a NixOS configuration with multiple nixpkgs instances could still be problematic, and by default nixvim does use a distinct nixpkgs instance for a while now. Under your given memory constraints, I’d make sure that nixpkgs.useGlobalPackages (probably in nixvim :man_shrugging:) is enabled.

An alternative appraoch for you might be to indeed use nixvim standalone, and update seperately as you see either fit.

Last but not least, you have the option to not use nixvim at all, which has the least cost on CPU and RAM ressources for evaluation and builds, usually. Though there the details massively depends on the wrapper you choose. But I doubt that any will be as expensive as nixvim.