diff --git a/lib/modules/init.nix b/lib/modules/init.nix index da255a2..d87eed8 100644 --- a/lib/modules/init.nix +++ b/lib/modules/init.nix @@ -57,7 +57,7 @@ in type = with types; nullOr (either path str); default = null; description = '' - Lua code to call before plugins loaded + Lua code to call before loading any plugins or even any sloth-flake calls. ''; }; @@ -65,7 +65,7 @@ in type = with types; nullOr (either path str); default = null; description = '' - Lua code called after init but before import + Lua code called after every non-lazy plugin’s init but before loading any plugin. ''; }; @@ -73,7 +73,7 @@ in type = with types; nullOr (either path str); default = null; description = '' - Lua code called after all plugins are loaded + Lua code called after all plugins are loaded and configured. ''; }; @@ -90,7 +90,12 @@ in option = mkOption { default = null; description = '' - init.lua configuration + init.lua configuration can be a string, a path or attribute set. + + The attribute set form will call sloth-flake for you and load your + plugins. It allows you to hook at different moments in the loading + process of your plugins: before everything, after all plugins init code + is called and after everything is loaded. ''; type = with types; coercedTo (nullOr (oneOf [path str])) coerceToModule self.module; example = ./init.lua;