3
0
Fork 0
forked from mirrors/nixpkgs

nixos: xserver typematic configuration options

This allows one to set the seat defaults for keyboard auto-repeat delay
and rate.
This commit is contained in:
Charles Strahan 2016-10-01 15:44:58 -04:00
parent 8b5c1190d6
commit f9a3835a14
No known key found for this signature in database
GPG key ID: BB47AB4B8489B5A5

View file

@ -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) ++