aboutsummaryrefslogtreecommitdiff
path: root/modules/workstation/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'modules/workstation/hardware')
-rw-r--r--modules/workstation/hardware/xkblayout/default.nix22
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
+ '';
+ };
}