Running Linux on a Macbook. Read through the wiki and was wondering if there’s a way to set the default keyboard layout to Colemak-dh so that it’s active prior to logging into Hyprland.
Currently, between LUKS and Hyprland starting, I’m in QWERTY. Once Hyprland opens, I’m in Colemak-dh. Here’s my config:
services = {
xserver = {
xkb.layout = "us,us";
xkb.variant = "colemak_dh,";
xkb.options = "grp:shifts_toggle";
};
};
jchw
November 9, 2024, 7:27pm
2
I don’t know the answer, but do you mean for LUKS or for your display manager?
For LUKS, I found a thread that might be relevant for this.
I tryied to simplement this a while ago Add an option to set GRUB keyboard layout · Issue #41247 · NixOS/nixpkgs · GitHub .
My conclusion at the time was that it probably is technically possible but the required options were not exposed in the high level grub commands nixos builds upon. And even then not every grub input module supported custom layout (only at_keyboard did). I don’t know if the situation changed since then.
In the end I used the dual passphrase hack you mentionned.
Specifically, see the last post for something that apparently works.
For your display manager, it might depend on what display manager you’re using, and whether it is being used in X11 mode or Wayland mode.
1 Like
That worked - thank you! I had to reduce the layouts to just Colemak-DH in configuration.nix:
# Apply system keymap to decrypt/login on boot
console = {
earlySetup = true;
useXkbConfig = true;
};
services = {
xserver = {
xkb.layout = "us";
xkb.variant = "colemak_dh";
};
};
Then in my hyprland config I can have the secondary qwerty layout that I can easily switch back to by hitting both shift keys at the same time, if needed:
input = {
kb_layout = "us,us";
kb_variant = "colemak_dh,";
kb_options = "grp:shifts_toggle";
};
This is fantastic. Thanks again, @jchw .
1 Like