From 665f0fa106d72bfb795e6ac2c3403d2dd78dbba1 Mon Sep 17 00:00:00 2001 From: Pei Yang Ching <59727193+horriblename@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:29:25 +0200 Subject: [PATCH] lazy: cleanup --- modules/wrapper/lazy/config.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/modules/wrapper/lazy/config.nix b/modules/wrapper/lazy/config.nix index 08298bdb..100ee375 100644 --- a/modules/wrapper/lazy/config.nix +++ b/modules/wrapper/lazy/config.nix @@ -3,7 +3,7 @@ config, ... }: let - inherit (builtins) toJSON typeOf head length tryEval filter concatLists concatStringsSep; + inherit (builtins) toJSON typeOf head length filter concatLists concatStringsSep; inherit (lib.attrsets) mapAttrsToList; inherit (lib.modules) mkIf mkMerge; inherit (lib.generators) mkLuaInline; @@ -86,15 +86,13 @@ in { require('lz.n').load(${toLuaObject lznSpecs}) ''; }) - ( - mkIf (!cfg.enable) { - startPlugins = mapAttrsToList (_: plugin: plugin.package) cfg.plugins; - luaConfigPre = - concatStringsSep "\n" - (filter (x: x != null) (mapAttrsToList (_: spec: spec.beforeAll) cfg.plugins)); - luaConfigRC.unlazy = entryAfter ["pluginConfigs"] notLazyConfig; - keymaps = concatLists (mapAttrsToList specToKeymaps cfg.plugins); - } - ) + (mkIf (!cfg.enable) { + startPlugins = mapAttrsToList (_: plugin: plugin.package) cfg.plugins; + luaConfigPre = + concatStringsSep "\n" + (filter (x: x != null) (mapAttrsToList (_: spec: spec.beforeAll) cfg.plugins)); + luaConfigRC.unlazy = entryAfter ["pluginConfigs"] notLazyConfig; + keymaps = concatLists (mapAttrsToList specToKeymaps cfg.plugins); + }) ]; }