Closed diniamo closed 3 months ago
You need to build config.system.build.toplevel of your nixos configuration. But I actually don't see much advantage over nix-build for a single derivation because the speed advantage comes with multiple derivations.
You can copy this snippet to your flake: https://github.com/Mic92/dotfiles/blob/2a89b32984d8cb5f0655c284098054c432af08ca/flake.nix#L174 than nix-fast-build without arguments will build everything in your flake including nixos.
I'm trying to build my system config with this, but it just gets stuck in a loop of throwing errors at me, a lot of them too. Here is an example output that I ran for about 20 seconds.