[Nix-dev] X keymap is not setting properly
Chris Murphy
camurp02009 at gmail.com
Fri Aug 5 18:51:27 CEST 2016
After installing NixOS last night, I have been trying to switch the
X server to use the dvorak keyboard layout. However, whenever the
system boots and the display manager (slim) starts up, everything
still uses QWERTY, even the login prompt. In my configuration.nix,
which is on <https://github.com/unternehmen/nix-configuration>,
I have the following lines:
services.xserver = {
enable = true;
exportConfiguration = true;
layout = "dvorak";
xkbVariant = "";
xkbOptions = "ctrl:nocaps";
# Enable the XFCE Desktop Environment.
desktopManager.xfce.enable = true;
};
Furthermore, several commands report that dvorak is being used,
even though QWERTY is instead. For example, I typed these
commands (with QWERTY):
$ localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: dvorak
X11 Layout: n/a
$ setxkbmap -query
rules: evdev
model: pc104
layout: dvorak
options: ctrl:nocaps
And in /etc/X11/xorg.conf, the following section exists, which
should be setting the keyboard layout to dvorak when X starts up:
Section "InputClass"
Identifier "Keyboard catchall"
MatchIsKeyboard "on"
Option "XkbRules" "base"
Option "XkbModel" "pc104"
Option "XkbLayout" "dvorak"
Option "XkbOptions" "ctrl:nocaps"
Option "XkbVariant" ""
EndSection
The only aspect of my chosen keymap which is actually working on
startup is the ctrl:nocaps option. So, when X starts up and the
layout is set to QWERTY, I can type Caps Lock-C and it will work
just as if I had typed Ctrl-C.
If I manually set the keymap to dvorak within an X session
using `setxkbmap dvorak`, X starts using dvorak correctly. After
I do so, the above commands output the same thing they did
before. This makes me think that somehow the keymap is being
set to QWERTY behind the backs of setxkbmap and localectl,
although I don't know what could be causing that.
Have I configured the system wrongly? How can I get X to really
use dvorak when it starts up? Thanks in advance for any help.
More information about the nix-dev
mailing list