New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load libinput xorg config correctly #31995
Conversation
50e498c
to
a6a5294
Compare
environment.etc = [ | ||
(let cfgPath = "/X11/xorg.conf.d/40-libinput.conf"; in { | ||
source = pkgs.xorg.xf86inputlibinput.out + "/share" + cfgPath; | ||
target = cfgPath; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but target
is not expected to start with /
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
In order for libinput to be used with Xorg, its configuration file needs to be added to environment similarly to how evdev one’s is. Closes: NixOS#31670
a6a5294
to
6d0db1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've confirmed that this change has no negatively effects on KDE.
40-libinput.conf
installed here successfully overrides 10-evdev.conf
installed in services/x11/xserver.nix
so the latter does not have to be disabled, even though it's redundant.
With libinput used for keyboard, base rules produce incorrect keyboard layouts. We are removing the option as recommended in the XKB configuration guide [1] to let X server choose the ruleset. It looks like it chooses evdev rules which seem to work for some reason [1]: https://www.x.org/releases/X11R7.6/doc/xorg-docs/input/XKB-Config.html#id2521360
6d0db1b
to
c177b83
Compare
Motivation for this change
evdev is broken in GNOME (#31670) so we need to use libinput. GNOME enables libinput but the NixOS module did not load the Xorg configuration resulting in libinput not being used.
I also had switch the base xkb rules to evdev. Not sure what the difference is (asked here) but the latter does not seem to produce a mangled keyboard layout.
Things done
Tried with GNOME 3.24 and 3.26.
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)