which as expected tries to build the whole NixOS system.
Is there a way for me to trim this down? I.e. tell it not to install any packages except those I explicitly told it to install in the configuration (and perhaps some that are absolutely necessary). I assume there’s some default list of packages somewhere that I should turn off or something.
Keep in mind many derivations are not packages in the traditional sense. That number is going to need to be fairly high just to have a nixos system at all. Every config file, random glue script that holds bits of things together, etc, is going to get its own derivation, generally.
Many such derivations are trivial to build and store, so the number of them is not really indicative of the amount of work involved.
It does only download packages installed/mentioned/configured.
Apparently it is downloading way more than I explicitly configured, because I configured none So either I’m not doing this right or there must be a default somewhere. If there’s a way to explicitly tell it to not install anything and start building from there, I’d like to explore that.
If you don’t want that stick to stable.
I don’t see this as a stable / unstable issue. I’m on a non-NixOS OS and just running nix to test the configuration. I’m trying to get it to build the smallest subset possible basically.
I.e. I want to build the smallest possible NixOS system + whatever select packages I’m currently interested in while doing the building itself outside of NixOS, if that makes sense.
So, depending on what you need, there’s almost an order of magnitude difference in size.
I understand why NixOS by default wants to build a lot of packages, that’s a sensible default. I’m looking to trim that down as much as possible basically. To take Ubuntu example, I’d like to go from the 2G desktop to 240M core (and even further if possible!), as for this particular testing I don’t care about most of the packages.