Add a non-system specific `<flake>.lib.nixvim` output, which is
equivalent to the existing `<flake>.lib.<system>.helpers` output.
This is now also wrapped with `lib.makeOverridable` to allow overriding
the function args used to construct the nixvim-lib.
Consistently access nixvim-lib via the new flake output, overriding
where necessary.
Expose our locked nixpkgs as the `nixpkgs.source` module options.
This only happens when `evalNixvim` is part of a lib that was provided
`flake` as an argument.
Stubbed the `nixpkgs.source` option for now. Eventually, this will be
used to construct `pkgs` internally. For now, it's purely informational.
This minimal implementation allows `nixpkgs.pkgs` to be defined, but
does not implement evaluating an instance from a pkgsPath when _not_
defined.
The `defaultPkgs` specialArg is dropped in favour of `nixpkgs.pkgs`
being defined. If it's not defined, an assertion is thrown.
In the future, a nixpkgs source path can be supplied, defaulting to the
flake's `inputs.nixpkgs`. Along with other `nixpkgs.*` options, this
will allow a `pkgs` instance to be evaluated within the module eval.
In the two places where our "helpers" lib is exclusively internal
(flake module args and building the docs), we no longer supply `pkgs`.
In the other 4 locations, we now note why we still do in a comment.
The old `default.nix` is inlined into the "lib" flake-module, which is
the only place it was used.
This allows "helpers" to take its rightful place at the root of `./lib` 👑
Since cbd1003d9d I'm able to add _some_
invalid config definitions to modules the tests are using and get no
build error.
For example `extraConfigLua = null;` should produce an invalid type
error, but doesn't.
One less visible change in that commit is the move away from using the
"standalone" wrapper (`makeNixvimWithModule`), which implicitly sets
`wrapRc = true`.
Adding back `wrapRc` to the tests seems to fix the issue, however this
makes me wonder if there's an underlying issue with wrapping/not-wrapping?
Perhaps we've simply uncovered a long-standing eval issue that is masked
over by using `wrapRc`?
Warnings and assertions defined as `config.warnings` and `config.assertions`
respectively will be checked as part of the test derivation, instead of
when evaluating the modules.
Adds new `checkWarnings` and `checkAssertions` test options (default true).