Consider switching to the NixOS module system for the input spec
Currently, the input spec is typed using Canix's ad-hoc typing system. We could rewrite everything to switch to the NixOS typing system, which would bring some advantages : like better discoverability, compatibility with introspection tools written for NixOS, ability to generate documentation (like it's done for NixOS options), better composition when used with flake-parts. One disadvantage is that not every valid input spec would have a corresponding JSON representation, but that's a restriction we can add ourselves if we really need it.
The other disadvantage is that the current typing system is... very simple, and that the NixOS typing system is a bit complex (at least in its implementation). It would also add strong coupling between Canix and NixOS, especially as the NixOS typing system is not (yet? there are efforts in this direction) independent of NixOS.
A decision about this is quite urgent, as it involves rewriting a good amount of code. It also has impact on the way we structure things : we'd need to see how our current "resolve then expand" process would fit in the NixOS typing system.