feat(keymap): route installer layout choice into Hyprland's Wayland session
core/home/config/nomarchy/default/hypr/input.conf hardcoded
`kb_layout = us`, so the installer's services.xserver.xkb.layout and
console.keyMap writes (both set from the installer's KEYMAP_LAYOUT
prompt) only reached XWayland apps and the TTY console. Native-Wayland
apps — i.e. almost everything in a Nomarchy desktop — fell back to US
regardless of what the user picked. Surprising for any non-US user.
Path (a) from the Later row:
- Added nomarchy.keymap.{layout,variant} to core/home/options.nix
(defaults "us" / "").
- Deleted the static input.conf from the bulk nomarchy/ deploy.
- Replaced it with an explicit
xdg.configFile."nomarchy/default/hypr/input.conf".text in
core/home/configs.nix that interpolates the option values into
kb_layout / kb_variant.
- Installer's home.nix heredoc now writes
nomarchy.keymap = { layout = "$KEYMAP_LAYOUT"; variant = "$KEYMAP_VARIANT"; };
alongside nomarchy.formFactor, so the layout reaches Hyprland
consistently with system.nix's xkb.layout / console.keyMap.
Documented in docs/OPTIONS.md (new `nomarchy.keymap.layout` /
`nomarchy.keymap.variant` entry). `nix flake check --no-build` clean.
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options = compose:caps
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
}
|
||||
}
|
||||
|
||||
misc {
|
||||
key_press_enables_dpms = true # key press will trigger wake
|
||||
mouse_move_enables_dpms = true # mouse move will trigger wake
|
||||
}
|
||||
@@ -59,6 +59,37 @@ in
|
||||
# built-in defaults and every Nomarchy notification customization is
|
||||
# inert.
|
||||
"mako/config".source = lib.mkDefault ./config/nomarchy/default/mako/core.ini;
|
||||
|
||||
# Hyprland's native-Wayland input config — templated from
|
||||
# nomarchy.keymap.{layout,variant} so non-US users get the right
|
||||
# layout in Wayland apps. The previous static input.conf hardcoded
|
||||
# `kb_layout = us`, so the installer's xkb.layout / console.keyMap
|
||||
# writes only reached XWayland and the TTY. Generated here rather
|
||||
# than shipped under config/nomarchy/default/hypr/ so the keymap
|
||||
# values can vary per-host without a source-file edit.
|
||||
"nomarchy/default/hypr/input.conf".text = lib.mkDefault ''
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = ${config.nomarchy.keymap.layout}
|
||||
kb_variant = ${config.nomarchy.keymap.variant}
|
||||
kb_model =
|
||||
kb_options = compose:caps
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
}
|
||||
}
|
||||
|
||||
misc {
|
||||
key_press_enables_dpms = true # key press will trigger wake
|
||||
mouse_move_enables_dpms = true # mouse move will trigger wake
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".XCompose" = lib.mkDefault {
|
||||
|
||||
@@ -56,6 +56,31 @@ in
|
||||
explicit value into the generated home.nix.
|
||||
'';
|
||||
};
|
||||
keymap = {
|
||||
layout = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "us";
|
||||
example = "dk";
|
||||
description = ''
|
||||
Keyboard layout for Hyprland's native Wayland session. The
|
||||
installer also writes services.xserver.xkb.layout (for XWayland)
|
||||
and console.keyMap (for the TTY) to the same value via
|
||||
system.nix, but Hyprland reads its own input config so it needs
|
||||
this option independently — otherwise non-US users get the
|
||||
right layout in XWayland apps and the console but the US
|
||||
fallback inside native-Wayland apps.
|
||||
'';
|
||||
};
|
||||
variant = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
example = "intl";
|
||||
description = ''
|
||||
Keyboard variant for Hyprland (e.g. "intl" for US-International).
|
||||
Empty by default.
|
||||
'';
|
||||
};
|
||||
};
|
||||
wallpaper = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = schema.home.wallpaper;
|
||||
|
||||
Reference in New Issue
Block a user