From 1d2d4cd088153bb672eef1e2f9e56194529bc767 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 36c18a9..9675e03 100644 --- a/modules/wrapper/lazy/config.nix +++ b/modules/wrapper/lazy/config.nix @@ -25,6 +25,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