I would switch perspective and say: “some flake attributes …” → “some clients …”.
Now we have the answer: the nix cli client treats default
specially.
But so could any other client, which — in the case of an overlay(/module) — would be an overlay(/module)-consumating function somewhere. I’m not aware that such is actually currently standardized somewhere in a library, but it could.
This switch in perspective also helps us understand that these .default
are much less special than one might initially think them being.
They are a UX concession made bleeding itself into an output convention. Whether that’s actually good, idk.
Looks like a layer violation, to me, on a second more thorough look: an alternative implementation could provide flakes with a proper name
attribute and by default accessor attributes of that name in outputs. In such a variant a UX concern wouldn’t bleed into output semantics, at least.