summary refs log tree commit diff
path: root/nixos/modules/services/x11
diff options
context:
space:
mode:
authorCharles Strahan <charles@cstrahan.com>2016-10-01 15:44:58 -0400
committerCharles Strahan <charles@cstrahan.com>2016-10-03 04:00:06 -0400
commitf9a3835a14e9bee3fb36e7d96d332cf30a5a94af (patch)
treea095c35af2e7bc811643031ef57e31ee43351301 /nixos/modules/services/x11
parent8b5c1190d61fc935977ad3e7353d9a78e0b8be77 (diff)
downloadnixlib-f9a3835a14e9bee3fb36e7d96d332cf30a5a94af.tar
nixlib-f9a3835a14e9bee3fb36e7d96d332cf30a5a94af.tar.gz
nixlib-f9a3835a14e9bee3fb36e7d96d332cf30a5a94af.tar.bz2
nixlib-f9a3835a14e9bee3fb36e7d96d332cf30a5a94af.tar.lz
nixlib-f9a3835a14e9bee3fb36e7d96d332cf30a5a94af.tar.xz
nixlib-f9a3835a14e9bee3fb36e7d96d332cf30a5a94af.tar.zst
nixlib-f9a3835a14e9bee3fb36e7d96d332cf30a5a94af.zip
nixos: xserver typematic configuration options
This allows one to set the seat defaults for keyboard auto-repeat delay
and rate.
Diffstat (limited to 'nixos/modules/services/x11')
-rw-r--r--nixos/modules/services/x11/xserver.nix20
1 files changed, 19 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 1bd578424ee4..5f10f9b48a8c 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -149,6 +149,22 @@ in
         '';
       };
 
+      autoRepeatDelay = mkOption {
+        type = types.nullOr types.int;
+        default = null;
+        description = ''
+          Sets the autorepeat delay (length of time in milliseconds that a key must be depressed before autorepeat starts).
+        '';
+      };
+
+      autoRepeatInterval = mkOption {
+        type = types.nullOr types.int;
+        default = null;
+        description = ''
+          Sets the autorepeat interval (length of time in milliseconds that should elapse between autorepeat-generated keystrokes).
+        '';
+      };
+
       inputClassSections = mkOption {
         type = types.listOf types.lines;
         default = [];
@@ -536,7 +552,9 @@ in
       ] ++ optional (cfg.display != null) ":${toString cfg.display}"
         ++ optional (cfg.tty     != null) "vt${toString cfg.tty}"
         ++ optional (cfg.dpi     != null) "-dpi ${toString cfg.dpi}"
-        ++ optional (!cfg.enableTCP) "-nolisten tcp";
+        ++ optional (!cfg.enableTCP) "-nolisten tcp"
+        ++ optional (cfg.autoRepeatDelay != null) "-ardelay ${toString cfg.autoRepeatDelay}"
+        ++ optional (cfg.autoRepeatInterval != null) "-arinterval ${toString cfg.autoRepeatInterval}";
 
     services.xserver.modules =
       concatLists (catAttrs "modules" cfg.drivers) ++