Probably not as-is, but I can see blueprint becoming a source of inspiration (among other projects) when designing the next iteration of flakes, once the current implementation has been marked as stable. Ideally flakes would be low overhead out of the box.
once the current implementation has been marked as stable
Iāll see you in 2060!
Hi. Iām new to NixOS, and right now Iām deciding on what to use as my starter config, since Iām using just default configuration.nix right now, with some added options.
Iāve stumbled upon Misterio77ās starter-configs at first, but after reading some posts and issues, Iāve found out about this nixpkgs problem. Iām still looking for a template that would implement the best practices of NixOS, and Blueprint seems promising, but, as I understand, it has the same problem @waffle8946 has wrote about.
As I am a new user, itās hard for me to wrap my head around. Could someone explain it to me?
- Does this mean I shouldnāt use this project?
- What are the practical consequences? Does it mean that the packages are stored multiple times on disk, or downloaded multiple times?
- Is there a better alternative?
I can give one example:
I have a blueprint with a host that has is cross compiled (its a resource constrained pi):
# ./hosts/pi-homeautomator.nix
{ pkgs,... }: {
nixpkgs.hostPlaform = "aarch64-linux";
nixpkgs.buildPlatform = "x86_64-linux";
}
Now i want to consume a package from the flake. If itās an overlay this just works. In another scenario Iām now stuck.
I wonder if we would make packages
defined using nixpkgs fixpoint lib, as opposed to the built in fixpoint in flakes; then at least the result can be spliced and you can call extend
on the set or convert the set to a pkgsCross
version. The problem is that flakes builtin fixpoint (the inputs param) makes all the nixpkgs cross compiling infra useless as you canāt splice your package even if you neatly define it with mkDerivation. You need the callPackageWith stuff
I think I would go deeper and look at how to get access to the flake fixpoint to make them programatically overridable.
Blueprint could solve this by having its own interface. Have a compatibility layer that maps the blueprint outputs to flake outputs. And if any other input is a blueprint, detect that and bypass the flake schema entirely. Thatās something I have been experimenting with, but it also introduces more complexity and questions to solve.
The 1000 instances of nixpkgs problem is only an issue for producers. Aka flakes that are going to be consumed by other flakes. In your case, this is the root flake, so you donāt have to worry about this.
Generally speaking my recommendation is not to worry too much. Youāre going to mess things up, and itās going to be fine. Pick a started template where you feel you can get things done, itās always possible to move things around later.
If you pick blueprint, donāt hesitate to create issues whenever you get stuck, so I can improve the documentation. I love getting the fresh userās perspective on things.
I think I accidentally stubled onto some nice design, because I keep getting feedbacks like this (I asked Oli if I could share):