This is useful to add additional defaults or when nixpkgs was patched
and we want to use the patched module sources instead of this specified
in the flake inputs.
While the `all-formats.nix` module allows to import all formats at once, it lacks an interface to customize formats or add formats.
This is fixed by adding the top-level option `formatConfigs` (attrsOf deferredModule).
All format modules created under `config.formatConfigs` are mapped so their outputs are available under `config.formats` which has also been moved to the top-level (previously `config.system.formats`).
Done:
- add option `formatConfigs`
- move option `system.formats` -> `formats`
- add test for customizing a format
This seems odd, but it works since input dependencies are lazily fetched
that means a downstream repo, that only consumes the modules output
(like for example `divnix/digga`), does never fetch nor instantiate
nixpkgs proper (which would be costly).
This enables `divnix/digga` to continue to _not_ depend on `nixpkgs`
for operation.
(it still depends on `nixpkgs` as a strict development dependency, but
beacause of the black magic which I describe above, no end user
will ever fetch it's depenency on `nixpkgs`.
So, here, we want to implement a similar trick to avoid acquireing deps
where they should net be acquired.