I’m having some issues with switching keyboard layouts in Niri. I can’t tell if this is a Niri bug, or something else on my system is messed up.
Here’s the outcome of my closest attempt I’ve gotten to (I tried to isolate keyboard related changes to a single commit of 5 lines). I am testing with 2 keyboard layouts and no variants.
My current behavior is that I can in theory switch keyboard layouts, but my keyboard still uses the first layout. I’ve tried disabling the xkb changes in either niri, or in the xserver settings, I tried with and without services.xserver.enabled = true
, and I am unsure what I’m doing wrong. (I would prefer services.xserver.enabled to remain false in my config if I can get away with it). I have not tried anything in home-manager and would be unsure what to try there.
Essentially, niri says I am using my Romanian layout, but my keys behave as English (US).
$ niri msg keyboard-layouts
Keyboard layouts:
0 English (US)
* 1 Romanian
I’m also unsure how to debug this further, would love to figure that out as well.
PS. I opened a related discussion on the Niri issue tracker, will summarize the outcome/solution on both threads at the end. Niri 25.05.1 seems to ignore keyboard layouts in my NixOS setup · YaLTeR/niri · Discussion #1963 · GitHub