From 09e83a6cec957a034a37b2f167696576d7523ca0 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Sat, 3 Aug 2024 19:46:52 +0200 Subject: [PATCH] lz.n: wrap lua code in 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 b1afb5b..38be892 100644 --- a/modules/wrapper/lazy/config.nix +++ b/modules/wrapper/lazy/config.nix @@ -31,6 +31,15 @@ (removeAttrs spec ["package" "setupModule" "setupOpts" "keys"]) // { "@1" = name; + before = + if spec.before != null + then + mkLuaInline '' + function() + ${spec.before} + end + '' + else null; after = mkLuaInline '' function() ${