aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-12-23 16:42:17 +0100
committerMx Kookie <kookie@spacekookie.de>2020-12-23 16:42:17 +0100
commite7fceae6deb3b38f495e2e7fae3b14189b4d19cb (patch)
treee6393b97f12bc33624e301c17c6bbaa9a2e55884 /infra/libkookie
parent606c9d9d1bc41b9ed3b188758109bd44450c90da (diff)
libkookie: xkblayout: init configuration
Diffstat (limited to 'infra/libkookie')
-rw-r--r--infra/libkookie/configuration/workstation/xkblayout/default.nix32
-rw-r--r--infra/libkookie/roots/tempest.nix2
2 files changed, 34 insertions, 0 deletions
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
+ '';
+ };
+}
diff --git a/infra/libkookie/roots/tempest.nix b/infra/libkookie/roots/tempest.nix
index a3d24a09027d..84b51273679d 100644
--- a/infra/libkookie/roots/tempest.nix
+++ b/infra/libkookie/roots/tempest.nix
@@ -31,6 +31,8 @@ in
#
<configuration/workstation/fonts>
+ <configuration/workstation/xkblayout>
+
#################################################################
# home-manager modules that exist entirely in userspace