The README/CONTRIBUTING files are authored with GitHub in mind, but we
want to re-use them for the docs website.
Replace the existing simple substitution with a pandoc AST-based filter.
Replace the `package-options` test with a stricter implementation.
When evaluating modules for use in the docs, provide them with a stubbed
`pkgs` instance that throws an error whenever a package is evaluated.
This ensures we don't accidentally use any packages in defaults or
examples.
`internal` options are intended to be implicitly not `visible`. This is
already handled correctly by the nixos tooling, but our custom tooling
did not correctly handle the edge case.
This lead to strange cases where an internal option is not included in
the docs, but its sub-options were still visible.
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.
This should help to maintain uniformity and hopefully make contributions
easier.
Kept regression tests local to the derivation, however these are also
added to the flake checks.
Based of the README for now, with a small additional "welcome to the
docs" section.
Perhaps in future, we could re-use the README.md verbatim? Perhaps with
some additional post-processing.
I think we'd want to dramatically reduce its size first though.
By having a dedicated homepage outside of `user-guide`, this fixes#1625
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.
By default `lib.evalModules` will check all config definitions match
a declared option (or a freeform type), leading to errors like:
error: The option `wrapRc' does not exist.
Setting `_module.freeformType` or `_module.check` will disable this,
allowing us to evaluate the option declaration without checking the
config definitions.
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.