mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Added an option to configure sensitivity and speed of trackpoints.
This commit is contained in:
parent
3a9917bf18
commit
128636ff24
@ -317,6 +317,7 @@
|
|||||||
./tasks/network-interfaces.nix
|
./tasks/network-interfaces.nix
|
||||||
./tasks/scsi-link-power-management.nix
|
./tasks/scsi-link-power-management.nix
|
||||||
./tasks/swraid.nix
|
./tasks/swraid.nix
|
||||||
|
./tasks/trackpoint.nix
|
||||||
./testing/service-runner.nix
|
./testing/service-runner.nix
|
||||||
./virtualisation/container-config.nix
|
./virtualisation/container-config.nix
|
||||||
./virtualisation/containers.nix
|
./virtualisation/containers.nix
|
||||||
|
66
nixos/modules/tasks/trackpoint.nix
Normal file
66
nixos/modules/tasks/trackpoint.nix
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
###### interface
|
||||||
|
|
||||||
|
options = {
|
||||||
|
|
||||||
|
hardware.trackpoint = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
description = ''
|
||||||
|
Enable sensitivity and speed configuration for trackpoints.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
sensitivity = mkOption {
|
||||||
|
default = 128;
|
||||||
|
example = 255;
|
||||||
|
type = types.int;
|
||||||
|
description = ''
|
||||||
|
Configure the trackpoint sensitivity. By default, the kernel
|
||||||
|
configures 128.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
speed = mkOption {
|
||||||
|
default = 97;
|
||||||
|
example = 255;
|
||||||
|
type = types.int;
|
||||||
|
description = ''
|
||||||
|
Configure the trackpoint sensitivity. By default, the kernel
|
||||||
|
configures 97.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
|
config = mkIf config.hardware.trackpoint.enable {
|
||||||
|
|
||||||
|
jobs.trackpoint =
|
||||||
|
{ description = "Initialize trackpoint";
|
||||||
|
|
||||||
|
startOn = "started udev";
|
||||||
|
|
||||||
|
task = true;
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
echo -n ${toString config.hardware.trackpoint.sensitivity} \
|
||||||
|
> /sys/devices/platform/i8042/serio1/sensitivity
|
||||||
|
echo -n ${toString config.hardware.trackpoint.speed} \
|
||||||
|
> /sys/devices/platform/i8042/serio1/speed
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user