mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
Merge pull request #3370 from geerds/trackpoint
Fix trackpoint configuration on some systems
This commit is contained in:
commit
c6f9222a22
1 changed files with 8 additions and 14 deletions
|
@ -46,21 +46,15 @@ with lib;
|
|||
|
||||
config = mkIf config.hardware.trackpoint.enable {
|
||||
|
||||
jobs.trackpoint =
|
||||
{ description = "Initialize trackpoint";
|
||||
services.udev.extraRules =
|
||||
''
|
||||
ACTION=="add|change", SUBSYSTEM=="input", ATTR{name}=="TPPS/2 IBM TrackPoint", ATTR{device/speed}="${toString config.hardware.trackpoint.speed}", ATTR{device/sensitivity}="${toString config.hardware.trackpoint.sensitivity}"
|
||||
'';
|
||||
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
system.activationScripts.trackpoint =
|
||||
''
|
||||
${config.systemd.package}/bin/udevadm trigger --attr-match=name="TPPS/2 IBM TrackPoint"
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue