Needed to use `options.*.settings` instead of `config.*.settings`.
I was concerned that the test-case didn't pick up on this, so I added an
new test case with some basic assertions.
Unfortunately this will print a confirmation when first using the flake:
```
do you want to allow configuration setting 'allow-import-from-derivation' to be set to 'false' (y/N)?
```
This is no different to the cachix configs though, so probably no big
deal.
lib/extend-lib.nix returns a nixpkg's lib extended with our own
helpers.
This is exposed as `helpers.extendedLib`, but when evaluating our
modules it should be assigned to `specialArgs.lib`.
Outside of our modules you must still access our helpers via
`config.lib.nixvim` or `config.lib.nixvim.extendedLib`.
Within helpers' sub-sections, `lib` is the extended lib.
This commit adds support for byte compiling lua configuration files.
It's enabled by default (if byte compiling is enabled at all) and can be
disabled with `performance.byteCompileLua.configs` toggle.
To implement this feature `extraFiles.<name>.finalSource` internal
read-only option is introduced. `source` option cannot be used because
it's user configurable. In order to access the values of the
`performance.byteCompileLua` options, parent config is added to
specialArgs of extraFiles submodule. Then the usages of `source` option
changed to `finalSource` in all relevant places (filesPlugin and
wrappers).
Added more helpers for various cases of byte compiling:
* `byteCompileLuaFile` byte compiles lua file
* `byteCompileLuaHook` is a setup hook that byte compiles all lua files
* `byteCompileLuaDrv` overrides derivation by adding byteCompileLuaHook
to it
Added tests to validate that extraFiles specified by various methods are
handled correctly. Added a separate home-manager test, that is intended
to validate that extraFiles propagated to wrapper modules are correctly
byte compiled.
* add `performance.byteCompileLua.enable` toggle to enable or disable
all byte compiling features
* add `performance.byteCompileLua.initLua` toggle to enable or
disable byte compiling of init.lua
* add `writeByteCompiledLua` helper for saving byte compiled lua source
code to the nix store
* `nixvim-print-init` utility is always pointed to uncompiled init.lua
* add tests
This moves most assertions out of generate-files and into a check
derivation. This should allow the CI to finish, even when there are
issues.
This also properly tests efmls, which was only checked partially before.
rust-analyzer is not covered because the existing assertions relate more
to edge-cases not handled by the generation script than the result it
builds.
These have been replaced in v3 with a new spec.
As we will soon migrate which-key to `settings` options, I've named the
new option `settings.spec` so that we do not need to "rename" it again
soon.
This commit **does not** actually add a freeform settings option.
Define `call = callPackageWith { inherit pkgs lib helpers; }`, which can
be used to automatically pass the correct args into helpers files.
`helpers` is passed in recursively.