diff options
author | Katharina Fey <kookie@spacekookie.de> | 2019-12-01 21:06:54 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2019-12-01 21:06:54 +0100 |
commit | b8cbb9fb5be8a096b0002c95ccfeee86ea19b593 (patch) | |
tree | 7f590545c96520ae2592f1be55ca3fe1fc61bbf7 /modules/workstation | |
parent | 546bb774517a2c56254472fc5a84f476d9875ef5 (diff) |
ws/hardware: setting Thinkpad keyboard to dvorak only
Diffstat (limited to 'modules/workstation')
-rw-r--r-- | modules/workstation/hardware/xkblayout/default.nix | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/modules/workstation/hardware/xkblayout/default.nix b/modules/workstation/hardware/xkblayout/default.nix index 1fa51cc0527..a77068cfd92 100644 --- a/modules/workstation/hardware/xkblayout/default.nix +++ b/modules/workstation/hardware/xkblayout/default.nix @@ -9,8 +9,24 @@ { i18n.consoleUseXkbConfig = true; - services.xserver.layout = "us"; - # environment.variables.XKB_DEFAULT_LAYOUT = xcfg.layout; - # environment.variables.XKB_DEFAULT_OPTIONS = xcfg.xkbOptions; + services.xserver = { + layout = "us"; + xkbVariant = "altgr-intl"; + xkbOptions = "caps:hyper"; + + # We want to set this layout modification as a per-device setting + # to avoid interpreting hardware keyboards with the same + # layout, which would otherwise lead to "double dvorak". + extraConfig = '' + Section "InputClass" + Identifier "Internal Keyboard" + MatchIsKeyboard "yes" + MatchProduct "AT Translated Set 2 keyboard" + Option "XkbLayout" "dvorak" + Option "XkbVariant" "altgr-intl" + Option "XkbOptions" "caps:hyper" + EndSection + ''; + }; } |