Open nrdxp opened 1 month ago
I like where this is going, but the *ForSystems syntax seems uneccesarily verbose.
This could also be something like mkPkgs
, the name isn't paramount to my main proposal.
I also just changed outputs to out to be as concise as possible, but that is just a stylistic preference of mine, not necessary. I did that to convey clearly to the newcomer that these things are both outputs, just different kinds. But maybe if you want maximum conciseness, that isn't necessary and you could just use sys and pure at the top level, but that risks ambiguity.
Mine is currently a stylistic choice as well. Not really sure the best way to go forward with this.
just use sys and pure at the top level
Yea, but sys sounds like it might be related to a NixOS system... which is a bit misleading, and pure
is only obvious if you has a background in functional programming. I would also be fine with something like perSystem = { pkgs }: { ... };
and just keeping the pure
outputs as top-level attrs.
It is also possible that the systems attribute would be more appropriate as out.systems instead, or even out.sys.systems, but maybe leaving it at the top-level is more "obvious" to the user that this is a cli level concern?
I don't think the values being return by doing something like getFlake
should know of a system.... not sure what this would look like.
I like where this is going, but the
*ForSystems
syntax seems uneccesarily verbose. Considering prior art like divnix/nosys, maybe there is a different approach. Nosys uses_
prefixed to an output attribute name to signify that the output is "systemless".That kind of approach may be too arcane for a proper and core API though, so perhaps we could do something like:
That way if we want to support schema extension, users don't have to type
ForSystem
for each new output they introduce, but only once.I also just changed
outputs
toout
to be as concise as possible, but that is just a stylistic preference of mine, not necessary. I did that to convey clearly to the newcomer that these things are both outputs, just different kinds. But maybe if you want maximum conciseness, that isn't necessary and you could just usesys
andpure
at the top level, but that risks ambiguity.It is also possible that the
systems
attribute would be more appropriate asout.systems
instead, or evenout.sys.systems
, but maybe leaving it at the top-level is more "obvious" to the user that this is a cli level concern?