refactor(hyprland): narrow keybind merge

This commit is contained in:
2026-10-11 12:29:18 -04:00
parent 337ede3ec5
commit 8a25d4bbe3

View File

@@ -7,10 +7,9 @@
{ {
options.modules.desktop.session.hyprland.enable = lib.mkEnableOption "the Hyprland compositor"; options.modules.desktop.session.hyprland.enable = lib.mkEnableOption "the Hyprland compositor";
config = lib.mkIf config.modules.desktop.session.hyprland.enable ( config = lib.mkIf config.modules.desktop.session.hyprland.enable {
lib.mkMerge [ registry.keybind.${config.networking.hostName} = lib.mkMerge [
{ {
registry.keybind.${config.networking.hostName} = {
hyprland-focus-left = { hyprland-focus-left = {
keys = "SUPER + H"; keys = "SUPER + H";
action = { action = {
@@ -42,10 +41,8 @@
direction = "right"; direction = "right";
}; };
}; };
};
} }
{ (lib.listToAttrs (
registry.keybind.${config.networking.hostName} = lib.listToAttrs (
map (workspace: { map (workspace: {
name = "hyprland-workspace-${toString workspace}"; name = "hyprland-workspace-${toString workspace}";
value = { value = {
@@ -56,9 +53,9 @@
}; };
}; };
}) (lib.range 1 9) }) (lib.range 1 9)
); ))
} ];
{
# This program integration owns the session, portals, and polkit, launched # This program integration owns the session, portals, and polkit, launched
# through the universal Wayland session manager. # through the universal Wayland session manager.
programs.hyprland = { programs.hyprland = {
@@ -101,7 +98,5 @@
}) (lib.attrByPath [ config.networking.hostName ] { } config.registry.keybind); }) (lib.attrByPath [ config.networking.hostName ] { } config.registry.keybind);
}; };
}; };
} };
]
);
} }