From c9716735290cef9e3ef44efda3a20cfeaa2c86fb Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 8 Nov 2024 17:55:18 +0100 Subject: [PATCH] lazy: wrap beforeAll in lua function --- modules/wrapper/lazy/config.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/wrapper/lazy/config.nix b/modules/wrapper/lazy/config.nix index 01deeb0..895adad 100644 --- a/modules/wrapper/lazy/config.nix +++ b/modules/wrapper/lazy/config.nix @@ -26,6 +26,15 @@ (removeAttrs spec ["package" "setupModule" "setupOpts" "keys"]) // { "@1" = name; + beforeAll = + if spec.beforeAll != null + then + mkLuaInline '' + function() + ${spec.beforeAll} + end + '' + else null; before = if spec.before != null then