Building nixos on lower end systems

I just tried installing nixos through the minimal iso on my 1 shared vcpu, 1gb vps, and it freezes on nix-install for hours with the entire system also uninteractive.

But then I found this github comment which worked. But I don’t like:

  • the need to have access another nixos instance
  • having to upload the store files to the target machine everytime
  • having to sync the channels (since target uses 24.05 and my local machine on unstable)

Is there a better way of installing nixos for lower end systems?

You don’t need another nixos computer, it can be any computer that runs nix.

You only need some minimal bootstrap config, not the full one necessarily. This is a one-time action.
There’s also things like nixos-infect, nixos-anywhere, etc.

Unnecessary, just ensure your config mentions the nixpkgs input that you use. Stop using channels, though.
I’d suggest using some lockfile scheme, such as npins, nvfetcher, or flakes.

1 Like