Added support for the plugin's "advanced" config settings.
Removed the enum restriction and prefix concatenation, allowing anything
to be passed through, including raw lua: fixes#1675
The theme list is now much shorter and is included directly in the option
description.
Some general cleanup, in particular to `extraConfig` and `customColorschemeType`.
as this isn't used by consumers, they should be able to remove this
input via `inputs.nixvim.inputs.git-hooks.follows = ""`. it is
especially important here as `git-hooks` has a large amount of inputs
itself
Moved `extraFiles` from `modules/output.nix` into its own file `modules/files.nix`.
Users should now assign text to a `text` attribute, however they could
also assign a file path to a `source` attribute instead.
The old method of directly assigning a string still works, and is
coerced to the new type along with a deprecation warning.
Based on `types.coerceTo`, which is like `types.either` but coerces the
left-hand type into the right-hand type.
`transitionType` only shows the right-hand type in its description and
also prints a warning when the left-hand type is used.
Co-authored-by: Silvan Mosberger <contact@infinisil.com>
Replaced the `isDocs` specialArg added in #1807 with an internal module
option.
We should only use `specialArgs` when absolutely necessary, a module or
`_module.args` is preferred, but those aren't available until `config`
is evaluated so they can't be used for `imports`.
The main problem with `specialArgs` is it makes our modules less
portable.
Luckily that shouldn't be an issue for these context flags.
This (internal) option introduces IFD, and can be substituted internally
with the `initPath` option easily.
If the content is required somewhere users can use readFile on the
initPath, though it will result in an IFD in their project.
If we access the asserts outside the derivation arguments, and inside
the code that _creates_ the derivation then we observe IFD in `nix flake
show`.
This commit fixes it, and allows `nix flake show` to work!
Fixes#1154
`lib.evalModules` always includes `lib`, `config`, `options`, &
(configured) `specialArgs` in the (final) `specialArgs`[1].
Therefore, setting `_module.args.lib` has no effect.
[1]: 329d232802/lib/modules.nix (L233)
Let's simplify things by defining all modules in `./plugins`, `./modules`
and `./wrappers/modules`.
Instead of currying `pkgs` into a bootstrapping module, we can require
`defaultPkgs` be provided as a special arg.
This refactor allows us to completely remove `flake-modules/modules.nix`!