Expose the platform wrapper modules as the Nixvim configuration options
`build.nixosModule`, `build.homeModule`, and `build.nixDarwinModule`.
This makes it possible to reuse a single Nixvim configuration across
NixOS, Home Manager, and nix-darwin without re-importing modules into
`programs.nixvim` manually.
Evaluating these wrapper modules requires a "bare" Nixvim configuration;
one that does not define `pkgs` or `nixpkgs.hostPlatform`. Such a
configuration would normally fail to evaluate, but disabling
`_module.check` provides a sufficiently lazy evaluation to access the
wrapper options.
To prevent the `_module.check = false` module from leaking into user
configs, it has a unique module key and gets disabled inside the wrapper
modules (`wrappers/_shared.nix`).
Push the rename warning down to the actual attributes, to avoid printing
it too early. Additionally, bind the warning to top-level static value,
to avoid printing it multiple times.
Simplify `oldestSupportedReleaseIsAtLeast 2505` to `true`, assuming this
will not be backported.
- Remove the `makeNixvimWithModule` module arg.
- Move standalone wrapper definitions to `wrappers.nix`
- Move `nixvimConfiguration` alias to `nixvim-configurations.nix`
The `import module args` pattern is useful for applying inputs from
outside of the module system, however it discards module location
metadata that is usually associated with file-path modules.
`lib.modules.importApply` solves that problem by wrapping the applied
module using `lib.modules.setDefaultModuleLocation`.
This means documentation, warnings, and errors will show the correct
location.