Mic92 / nix-fast-build

Combine the power of nix-eval-jobs with nix-output-monitor to speed-up your evaluation and building process.
MIT License
258 stars 12 forks source link

How to use it instead of nixos-rebuild? #67

Closed DADA30000 closed 5 months ago

DADA30000 commented 5 months ago

I'm kinda new to nixos, and I want to speed up my build times, is there any way to use nix-fast-build instead of nixos-rebuild? (I'm using flakes)

Mic92 commented 5 months ago

nix-fast-build is more useful if you have to build several outputs where you can benefit from parallel evaluation. With nixos-rebuild you will only have a single system to evaluate, so you are not really benefiting from nix-fast-build in the end.

The only real advantage I see is if you use a remote machine to build your configuration and than copy the result back:

nix run github:Mic92/nix-fast-build -- --remote vislor.dos.cit.tum.de --flake '.#nixosConfigurations.eve.config.system.build.toplevel'

replace eve with your nixos configuration name in a flake.

llakala commented 2 months ago

Would be good to add this to the README: casual users might expect this to replace nixos-rebuild, when that isn't its goal.

Mic92 commented 2 months ago

Feel free to make a pull request.