MyNixOS website logo
option

wayland.windowManager.hyprland.extraLuaFiles

Extra Lua files written under $XDG_CONFIG_HOME/hypr.

Attribute names are used as Lua module names and converted to file names with a .lua suffix added when missing. For example, bindings writes $XDG_CONFIG_HOME/hypr/bindings.lua, while lib.helpers writes $XDG_CONFIG_HOME/hypr/lib/helpers.lua.

Files with autoLoad enabled generate require(...) calls in $XDG_CONFIG_HOME/hypr/hyprland.lua after adding the Hypr config directory to Lua's package.path. Use autoLoad = false for helper modules that are imported by other Lua files.

This option only affects generated files when wayland.windowManager.hyprland.configType is "lua".

Declarations
Type
attribute set of ((submodule) or (absolute path or strings concatenated with "\n") convertible to it)
Default
{ }
Example
{
  "00-vars" = '\'
    local M = {}
    M.mainMod = "SUPER"
    return M
  '\';

  "ui.bindings" = {
    content = ./bindings.lua;
    autoLoad = true;
  };

  "lib.helpers" = {
    content = ./helpers.lua;
    autoLoad = false;
  };

  "from-path.lua" = ./startup.lua;
}