Commit graph

10 commits

Author SHA1 Message Date
Stanislav Asunkin
44849233e0 modules/performance: add ability to byte compile lua configuration files
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.
2024-07-31 11:31:40 +00:00
Stanislav Asunkin
c9a6912be5 modules/files: fix creating configs of vim type 2024-07-19 14:45:34 +03:00
Gaetan Lepage
f1289fadee misc/post-release 24.05: update workflows 2024-06-06 14:46:34 +02:00
Gaetan Lepage
f02d8c95ac misc: prepare 24.05 release 2024-06-06 14:06:46 +02:00
traxys
62f32bfc71 treewide: Reformat with nixfmt 2024-05-05 22:00:40 +02:00
Matt Sturgeon
4f83bcf290
Rename options to avoid confusion with module options (#1324) 2024-03-29 21:58:44 +01:00
Gaetan Lepage
6b6de34c22 tests/modules/files: init 2024-02-09 21:18:46 +01:00
traxys
2167c1930c
tests: Add a test for nix-darwin modules (#909) 2024-01-06 18:03:44 +01:00
traxys
245930d735
tests: Add a test for the nixos module (#907) 2024-01-06 17:53:31 +01:00
traxys
96cdbc8177
tests: Add a test for the home-manager module (#901) 2024-01-06 17:31:17 +01:00