Implement Hyprland Lua migration

This commit is contained in:
2026-04-28 21:10:34 -07:00
parent c5a0ddd7b1
commit 9c9af9f856
9 changed files with 2033 additions and 159 deletions

View File

@@ -7,6 +7,10 @@ let
if cfg.useLuaConfigBranch
then inputs.hyprland-lua-config
else inputs.hyprland;
luaPluginPackages = lib.optionals cfg.useLuaConfigBranch [
inputs.hyprNStack.packages.${system}.hyprNStack
inputs.hyprland-plugins-lua.packages.${system}.hyprexpo
];
hyprexpoPatched = inputs.hyprland-plugins.packages.${system}.hyprexpo.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
./patches/hyprexpo-pr-612-workspace-numbers.patch
@@ -35,7 +39,15 @@ let
home-manager.sharedModules = [
inputs.hyprscratch.homeModules.default
{
({ config, ... }: {
xdg.configFile."hypr" = {
force = true;
source =
if cfg.useLuaConfigBranch
then ../dotfiles/config/hypr
else config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dotfiles/dotfiles/config/hypr";
};
services.kanshi = {
enable = true;
systemdTarget = "graphical-session.target";
@@ -78,8 +90,8 @@ let
];
};
programs.hyprscratch = {
enable = true;
programs.hyprscratch = {
enable = !cfg.useLuaConfigBranch;
settings = {
daemon_options = "clean";
global_options = "";
@@ -135,7 +147,7 @@ let
};
};
};
}
})
];
# Hyprland-specific packages
@@ -157,10 +169,10 @@ let
# For scripts
jq
] ++ lib.optionals enableExternalPluginPackages [
] ++ luaPluginPackages ++ lib.optionals enableExternalPluginPackages [
# External plugin packages are pinned to the stable 0.53 stack.
# PR 13817's Hyprland branch builds, but hy3 / hyprexpo do not yet build
# against it, so keep them out of the experimental Lua branch for now.
# Keep hy3 on the stable stack; the Lua branch uses hyprNStack and the
# forked Lua-compatible hyprexpo input instead.
inputs.hy3.packages.${system}.hy3
hyprexpoPatched
];
@@ -173,11 +185,10 @@ enabledModule // {
default = false;
description = ''
Use the experimental Hyprland PR 13817 Lua-config branch for the
Hyprland package itself. Third-party plugins are left on the stable
stack and are excluded from the experimental package set because current
`hy3` and `hyprexpo` sources do not build against PR 13817 yet. The
existing `hyprland.conf` remains active until a sibling `hyprland.lua`
file is added.
Hyprland package itself. The experimental package set excludes hy3, and
includes the Lua-branch builds of hyprNStack and hyprexpo instead. When
a sibling `hyprland.lua` is present, the Lua config manager picks it
before `hyprland.conf`.
'';
};
};