Customizable flake outputs with flake schemas

6 Likes

This is neat.

Some questions:

  • Are there plans to upstream this?
  • I notice that there’s a version field–what is the intended use of that?
  • What motivated this–customer work or some other gap analysis?
  1. At some point, yes. There is this PR: Flake schemas by edolstra · Pull Request #8892 · NixOS/nix · GitHub. But it’s old. I suspect Eelco will opt for a fresh start rather than shepherding that PR. But I suspect upstreaming could be an uphill climb, as it would require building consensus around a set of default output types and a well-defined programming model. We opted to make it “you have defaults and if you want to use not-defaults you have to be 100% explicit" but we’re not sure how well received that will be.
  2. This is just an announcement post. We’ll follow up with more in-depth documentation soon. version is there mostly as a just-in-case thing but I’m not sure we’re committed to it, and it’s not yet clear if a field like that has value if you’re already pinning that flake.
  3. The post explains one of our internal use cases. But in general there isn’t much in-depth gap analysis behind it beyond (a) us wanting it and (b) suspecting that others would be as dissatisfied by unknown as we were.
2 Likes

Gotcha! Thank you for the reply. Good stuff. :slight_smile:

1 Like