From e7fceae6deb3b38f495e2e7fae3b14189b4d19cb Mon Sep 17 00:00:00 2001 From: Mx Kookie Date: Wed, 23 Dec 2020 16:42:17 +0100 Subject: libkookie: xkblayout: init configuration --- .../workstation/xkblayout/default.nix | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 infra/libkookie/configuration/workstation/xkblayout/default.nix (limited to 'infra/libkookie/configuration') diff --git a/infra/libkookie/configuration/workstation/xkblayout/default.nix b/infra/libkookie/configuration/workstation/xkblayout/default.nix new file mode 100644 index 000000000000..e4d2fab4b0e5 --- /dev/null +++ b/infra/libkookie/configuration/workstation/xkblayout/default.nix @@ -0,0 +1,32 @@ +/* KEYBOARD LAYOUT MODULE + * + * (INCOMPLETE) Setup keyboard layout + * and overrides. Currently this is + * mostly handled by GRAPHICS/I3 but + * should maybe be moved here? + */ +{ pkgs, config, ... }: + +{ + console.useXkbConfig = true; + + 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 + ''; + }; +} -- cgit v1.2.3