Flip-flopping again: I think the test of this would be if output schemas
is actually required to handle any real world use cases - or if a whitelist of possible outputs is sufficient.
My worry is that if you’re starting to define schemas in flakes then you’re asking for some form of extensible module system, which we already have.
I guess in an alternate world flakes would look like:
{
inputs = {
nixos.url = "github:nixos/nixpkgs";
home-manager.url = "github:nix-community/home-manager";
nixops.url = "github:nixos/nixops";
};
outputs = {
nixos = {
modules = ...;
configurations = ...;
templates = ...;
overlays = ...;
};
home-manager = {
configurations = ...;
templates = ...;
modules = ...;
overlays = ...;
};
nixops = {
resources = ...;
deployments = ...;
modules = ...;
};
};
}
Then each of these top-level attributes would be defined as modules.
-
inputs = { ... };
starts to look a lot likeimports = [ ... ];
-
outputs = { ... };
starts to look a lot likeconfig = { ... };
- adding something like
schemas = { ... };
looks a lot likeoptions = { ... };