feat(hyprland): start lua config migration #146

Merged
alexion merged 1 commits from feat/hyprland-lua-config-v2 into main 2026-10-11 16:02:02 -04:00
Owner

Summary

  • Start the Hyprland Lua migration with a minimal Home Manager generated Lua config.
  • Keep UWSM and NixOS package ownership intact.
  • Comment out external Hyprland binds and rules for later slices.
  • Convert Zeus monitors to Lua-compatible records so Zeus remains usable.

Slice 1 Checklist

  • Switch Home Manager to emit Lua instead of Hyprlang.
    • Static check: generated config contains hl.* calls.
  • Keep UWSM as the Hyprland session owner.
    • Static check: Nix config still enables UWSM.
  • Keep NixOS as the owner of Hyprland and xdg-desktop-portal-hyprland.
    • Static check: Home Manager sets package = null and portalPackage = null.
  • Disable Home Manager's Hyprland systemd target.
    • Static check: systemd.enable = false.
  • Wipe Home Manager Hyprland settings to a minimal config.
    • Static check: old binds, environment variables, animations, and monitor defaults are absent from the main module.
  • Comment out external Hyprland settings with literal comments.
    • Static check: disabled key binds and rules remain visible in place.
  • Keep Zeus monitor behavior active.
    • Static check: Zeus monitor settings are not commented out.
  • Convert Zeus monitors to Lua-compatible records.
    • Static check: generated Lua contains hl.monitor(...) calls for both outputs.
  • Add config.general.layout = "dwindle" as the minimal static Lua setting.
    • Static check: generated Lua contains an hl.config(...) call.
  • Add Super+Return launching Ghostty as the minimal Lua key binding.
    • Static check: generated Lua contains an hl.bind(...) call.
  • Keep feature-module bindings absent.
    • Static check: launcher, lock, notification, clipboard, recording, and screenshot binds are absent from generated Lua.
  • Record the generated Lua excerpt for review.
    • See Generated Lua excerpt below.

Static Verification

  • nix run .#fix
  • bazel run //src/natu:natu -- configs/nixos/hosts/zeus/default.nix configs/nixos/modules/desktop/session/hyprland/default.nix configs/nixos/modules/desktop/session/hyprland/hyprlock.nix configs/nixos/modules/desktop/session/mako.nix configs/nixos/modules/desktop/session/rofi.nix configs/nixos/modules/desktop/utilities/clipboard.nix configs/nixos/modules/desktop/utilities/recording.nix configs/nixos/modules/desktop/utilities/screenshot.nix
  • nix eval --raw .#nixosConfigurations.zeus.config.home-manager.users.alexion.xdg.configFile."hypr/hyprland.lua".text
  • nix eval --json .#nixosConfigurations.zeus.config.home-manager.users.alexion.wayland.windowManager.hyprland.package
  • nix eval --json .#nixosConfigurations.zeus.config.home-manager.users.alexion.wayland.windowManager.hyprland.portalPackage
  • nix eval --json .#nixosConfigurations.zeus.config.home-manager.users.alexion.wayland.windowManager.hyprland.systemd.enable
  • nix eval --raw .#nixosConfigurations.zeus.config.home-manager.users.alexion.wayland.windowManager.hyprland.configType

Generated Lua

This is the generated Zeus Lua config from static verification.
hl.config(...) is one merged Home Manager output block.
Stylix contributes colors and misc settings to that same block.

-- Generated by Home Manager.
-- See https://wiki.hypr.land/Configuring/Start/

-- settings.config
hl.config({
  ["decoration"] = {
    ["shadow"] = {
      ["color"] = "rgba(2e344099)"
    }
  },
  ["general"] = {
    ["col.active_border"] = "rgb(81a1c1)",
    ["col.inactive_border"] = "rgb(4c566a)",
    ["layout"] = "dwindle"
  },
  ["group"] = {
    ["col.border_active"] = "rgb(81a1c1)",
    ["col.border_inactive"] = "rgb(4c566a)",
    ["col.border_locked_active"] = "rgb(88c0d0)",
    ["groupbar"] = {
      ["col.active"] = "rgb(81a1c1)",
      ["col.inactive"] = "rgb(4c566a)",
      ["text_color"] = "rgb(e5e9f0)"
    }
  },
  ["misc"] = {
    ["background_color"] = "rgb(2e3440)",
    ["disable_hyprland_logo"] = true
  }
})

-- settings.bind
hl.bind("SUPER + Return", (hl.dsp.exec_cmd("ghostty")))

-- settings.monitor
hl.monitor({
  ["mode"] = "1920x1080@120",
  ["output"] = "HDMI-A-1",
  ["position"] = "0x0",
  ["scale"] = 1,
  ["transform"] = 3
})
hl.monitor({
  ["mode"] = "2560x1440@239.96",
  ["output"] = "DP-3",
  ["position"] = "1080x0",
  ["scale"] = 1
})

Live Zeus Review Tasks

  • Log into Hyprland on Zeus.
  • Confirm both monitors are usable.
  • Confirm HDMI-A-1 keeps transform 3.
  • Press Super+Return and confirm Ghostty opens.
  • Confirm the old feature-module binds are absent for this slice.
## Summary - Start the Hyprland Lua migration with a minimal Home Manager generated Lua config. - Keep UWSM and NixOS package ownership intact. - Comment out external Hyprland binds and rules for later slices. - Convert Zeus monitors to Lua-compatible records so Zeus remains usable. ## Slice 1 Checklist - [x] Switch Home Manager to emit Lua instead of Hyprlang. - Static check: generated config contains `hl.*` calls. - [x] Keep UWSM as the Hyprland session owner. - Static check: Nix config still enables UWSM. - [x] Keep NixOS as the owner of Hyprland and `xdg-desktop-portal-hyprland`. - Static check: Home Manager sets `package = null` and `portalPackage = null`. - [x] Disable Home Manager's Hyprland systemd target. - Static check: `systemd.enable = false`. - [x] Wipe Home Manager Hyprland settings to a minimal config. - Static check: old binds, environment variables, animations, and monitor defaults are absent from the main module. - [x] Comment out external Hyprland settings with literal comments. - Static check: disabled key binds and rules remain visible in place. - [x] Keep Zeus monitor behavior active. - Static check: Zeus monitor settings are not commented out. - [x] Convert Zeus monitors to Lua-compatible records. - Static check: generated Lua contains `hl.monitor(...)` calls for both outputs. - [x] Add `config.general.layout = "dwindle"` as the minimal static Lua setting. - Static check: generated Lua contains an `hl.config(...)` call. - [x] Add Super+Return launching Ghostty as the minimal Lua key binding. - Static check: generated Lua contains an `hl.bind(...)` call. - [x] Keep feature-module bindings absent. - Static check: launcher, lock, notification, clipboard, recording, and screenshot binds are absent from generated Lua. - [x] Record the generated Lua excerpt for review. - See Generated Lua excerpt below. ## Static Verification - `nix run .#fix` - `bazel run //src/natu:natu -- configs/nixos/hosts/zeus/default.nix configs/nixos/modules/desktop/session/hyprland/default.nix configs/nixos/modules/desktop/session/hyprland/hyprlock.nix configs/nixos/modules/desktop/session/mako.nix configs/nixos/modules/desktop/session/rofi.nix configs/nixos/modules/desktop/utilities/clipboard.nix configs/nixos/modules/desktop/utilities/recording.nix configs/nixos/modules/desktop/utilities/screenshot.nix` - `nix eval --raw .#nixosConfigurations.zeus.config.home-manager.users.alexion.xdg.configFile."hypr/hyprland.lua".text` - `nix eval --json .#nixosConfigurations.zeus.config.home-manager.users.alexion.wayland.windowManager.hyprland.package` - `nix eval --json .#nixosConfigurations.zeus.config.home-manager.users.alexion.wayland.windowManager.hyprland.portalPackage` - `nix eval --json .#nixosConfigurations.zeus.config.home-manager.users.alexion.wayland.windowManager.hyprland.systemd.enable` - `nix eval --raw .#nixosConfigurations.zeus.config.home-manager.users.alexion.wayland.windowManager.hyprland.configType` ## Generated Lua This is the generated Zeus Lua config from static verification. `hl.config(...)` is one merged Home Manager output block. Stylix contributes colors and misc settings to that same block. ```lua -- Generated by Home Manager. -- See https://wiki.hypr.land/Configuring/Start/ -- settings.config hl.config({ ["decoration"] = { ["shadow"] = { ["color"] = "rgba(2e344099)" } }, ["general"] = { ["col.active_border"] = "rgb(81a1c1)", ["col.inactive_border"] = "rgb(4c566a)", ["layout"] = "dwindle" }, ["group"] = { ["col.border_active"] = "rgb(81a1c1)", ["col.border_inactive"] = "rgb(4c566a)", ["col.border_locked_active"] = "rgb(88c0d0)", ["groupbar"] = { ["col.active"] = "rgb(81a1c1)", ["col.inactive"] = "rgb(4c566a)", ["text_color"] = "rgb(e5e9f0)" } }, ["misc"] = { ["background_color"] = "rgb(2e3440)", ["disable_hyprland_logo"] = true } }) -- settings.bind hl.bind("SUPER + Return", (hl.dsp.exec_cmd("ghostty"))) -- settings.monitor hl.monitor({ ["mode"] = "1920x1080@120", ["output"] = "HDMI-A-1", ["position"] = "0x0", ["scale"] = 1, ["transform"] = 3 }) hl.monitor({ ["mode"] = "2560x1440@239.96", ["output"] = "DP-3", ["position"] = "1080x0", ["scale"] = 1 }) ``` ## Live Zeus Review Tasks - [x] Log into Hyprland on Zeus. - [x] Confirm both monitors are usable. - [x] Confirm HDMI-A-1 keeps transform 3. - [x] Press Super+Return and confirm Ghostty opens. - [x] Confirm the old feature-module binds are absent for this slice.
Author
Owner

Update after live testing:

  • Removed the forced HYPRLAND_CONFIG=/home/alexion/.config/hypr/hyprland.lua login command change.
  • Slice 1 now relies on Hyprland's normal config discovery again.
  • This slice requires a Hyprland session restart because it switches the compositor config backend from Hyprlang to Lua.
  • If a stale ~/.config/hypr/hyprland.conf remains from the old Home Manager generation, rename or remove it before the restart so Hyprland discovers hyprland.lua.

Suggested live-test flow:

mv ~/.config/hypr/hyprland.conf ~/.config/hypr/hyprland.conf.autogenerated
# restart the Hyprland session, not just `hyprctl reload`
Update after live testing: - Removed the forced `HYPRLAND_CONFIG=/home/alexion/.config/hypr/hyprland.lua` login command change. - Slice 1 now relies on Hyprland's normal config discovery again. - This slice requires a Hyprland session restart because it switches the compositor config backend from Hyprlang to Lua. - If a stale `~/.config/hypr/hyprland.conf` remains from the old Home Manager generation, rename or remove it before the restart so Hyprland discovers `hyprland.lua`. Suggested live-test flow: ```sh mv ~/.config/hypr/hyprland.conf ~/.config/hypr/hyprland.conf.autogenerated # restart the Hyprland session, not just `hyprctl reload` ```
alexion added 1 commit 2026-10-10 13:57:40 -04:00
alexion force-pushed feat/hyprland-lua-config-v2 from 16d7d81dc1 to 85fadc5bfc 2026-10-10 13:57:40 -04:00 Compare
alexion merged commit 85fadc5bfc into main 2026-10-11 16:02:02 -04:00
alexion deleted branch feat/hyprland-lua-config-v2 2026-10-11 16:02:06 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: alexion/dev#146