git.iko.soy/typeable/nixpkgs
on master help sign in
nixos: xserver typematic configuration options

This allows one to set the seat defaults for keyboard auto-repeat delay and rate.

commitf9a3835a14e9bee3fb36e7d96d332cf30a5a94af authorCharles Strahan <charles@cstrahan.com> dateSat 1 Oct 2016, 15:44 (10 years ago) parent8b5c119
1 file changed+19−1
nixos/modules/services/x11/xserver.nix+19−1
nixos/modules/services/x11/xserver.nix+19−1
@@ -149,6 +149,22 @@ in
149149 '';
150150 };
151151
152+ autoRepeatDelay = mkOption {
153+ type = types.nullOr types.int;
154+ default = null;
155+ description = ''
156+ Sets the autorepeat delay (length of time in milliseconds that a key must be depressed before autorepeat starts).
157+ '';
158+ };
159+
160+ autoRepeatInterval = mkOption {
161+ type = types.nullOr types.int;
162+ default = null;
163+ description = ''
164+ Sets the autorepeat interval (length of time in milliseconds that should elapse between autorepeat-generated keystrokes).
165+ '';
166+ };
167+
152168 inputClassSections = mkOption {
153169 type = types.listOf types.lines;
154170 default = [];
@@ -536,7 +552,9 @@ in
536552 ] ++ optional (cfg.display != null) ":${toString cfg.display}"
537553 ++ optional (cfg.tty != null) "vt${toString cfg.tty}"
538554 ++ optional (cfg.dpi != null) "-dpi ${toString cfg.dpi}"
539− ++ optional (!cfg.enableTCP) "-nolisten tcp";
555+ ++ optional (!cfg.enableTCP) "-nolisten tcp"
556+ ++ optional (cfg.autoRepeatDelay != null) "-ardelay ${toString cfg.autoRepeatDelay}"
557+ ++ optional (cfg.autoRepeatInterval != null) "-arinterval ${toString cfg.autoRepeatInterval}";
540558
541559 services.xserver.modules =
542560 concatLists (catAttrs "modules" cfg.drivers) ++