fix(nixos): launch Hyprland with Lua configuration
This commit is contained in:
@@ -19,10 +19,7 @@ let
|
|||||||
|
|
||||||
# Numbered-workspace switch and move for 1..9, the operator's i3 muscle memory.
|
# Numbered-workspace switch and move for 1..9, the operator's i3 muscle memory.
|
||||||
workspaceBinds = lib.concatMap (n: [
|
workspaceBinds = lib.concatMap (n: [
|
||||||
(mkBind ''mod .. " + ${toString n}"''
|
(mkBind ''mod .. " + ${toString n}"'' (lua ''hl.dsp.focus({ workspace = "${toString n}" })'') { })
|
||||||
(lua "hl.dsp.workspace.change_id(${builtins.toJSON (toString n)})")
|
|
||||||
{ }
|
|
||||||
)
|
|
||||||
(mkBind ''mod .. " + SHIFT + ${toString n}"''
|
(mkBind ''mod .. " + SHIFT + ${toString n}"''
|
||||||
(lua ''hl.dsp.window.move({ workspace = "${toString n}", follow = false })'')
|
(lua ''hl.dsp.window.move({ workspace = "${toString n}", follow = false })'')
|
||||||
{ }
|
{ }
|
||||||
@@ -132,7 +129,7 @@ in
|
|||||||
accel_profile = "flat";
|
accel_profile = "flat";
|
||||||
touchpad = {
|
touchpad = {
|
||||||
natural_scroll = true;
|
natural_scroll = true;
|
||||||
tap-to-click = true;
|
tap_to_click = true;
|
||||||
disable_while_typing = true;
|
disable_while_typing = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -225,10 +222,10 @@ in
|
|||||||
(mkBind ''mod .. " + RETURN"'' (lua "hl.dsp.exec_cmd(terminal)") { })
|
(mkBind ''mod .. " + RETURN"'' (lua "hl.dsp.exec_cmd(terminal)") { })
|
||||||
|
|
||||||
# Move focus.
|
# Move focus.
|
||||||
(mkBind ''mod .. " + H"'' (lua ''hl.dsp.focus("l")'') { })
|
(mkBind ''mod .. " + H"'' (lua ''hl.dsp.focus({ direction = "left" })'') { })
|
||||||
(mkBind ''mod .. " + J"'' (lua ''hl.dsp.focus("d")'') { })
|
(mkBind ''mod .. " + J"'' (lua ''hl.dsp.focus({ direction = "down" })'') { })
|
||||||
(mkBind ''mod .. " + K"'' (lua ''hl.dsp.focus("u")'') { })
|
(mkBind ''mod .. " + K"'' (lua ''hl.dsp.focus({ direction = "up" })'') { })
|
||||||
(mkBind ''mod .. " + L"'' (lua ''hl.dsp.focus("r")'') { })
|
(mkBind ''mod .. " + L"'' (lua ''hl.dsp.focus({ direction = "right" })'') { })
|
||||||
|
|
||||||
# Move the window within the layout.
|
# Move the window within the layout.
|
||||||
(mkBind ''mod .. " + SHIFT + H"'' (lua ''hl.dsp.window.move({ direction = "l" })'') { })
|
(mkBind ''mod .. " + SHIFT + H"'' (lua ''hl.dsp.window.move({ direction = "l" })'') { })
|
||||||
|
|||||||
@@ -6,6 +6,10 @@
|
|||||||
}:
|
}:
|
||||||
# Text login: greetd running the tuigreet greeter, which starts the session
|
# Text login: greetd running the tuigreet greeter, which starts the session
|
||||||
# through the universal Wayland session manager.
|
# through the universal Wayland session manager.
|
||||||
|
let
|
||||||
|
hyprlandConfig =
|
||||||
|
config.home-manager.users.${config.user.name}.xdg.configFile."hypr/hyprland.lua".source;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
options.modules.desktop.session.login.enable =
|
options.modules.desktop.session.login.enable =
|
||||||
lib.mkEnableOption "greetd with the tuigreet text greeter";
|
lib.mkEnableOption "greetd with the tuigreet text greeter";
|
||||||
@@ -15,7 +19,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings.default_session.command =
|
settings.default_session.command =
|
||||||
"${lib.getExe pkgs.tuigreet} --time --remember "
|
"${lib.getExe pkgs.tuigreet} --time --remember "
|
||||||
+ "--cmd 'uwsm start -e -D Hyprland hyprland.desktop'";
|
+ "--cmd 'uwsm start -e -D Hyprland ${config.programs.hyprland.package}/bin/Hyprland --config ${hyprlandConfig}'";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user