Merge pull request #3370 from geerds/trackpoint
Fix trackpoint configuration on some systems
This commit is contained in:
commit
c6f9222a22
@ -46,21 +46,15 @@ with lib;
|
|||||||
|
|
||||||
config = mkIf config.hardware.trackpoint.enable {
|
config = mkIf config.hardware.trackpoint.enable {
|
||||||
|
|
||||||
jobs.trackpoint =
|
services.udev.extraRules =
|
||||||
{ description = "Initialize trackpoint";
|
''
|
||||||
|
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";
|
system.activationScripts.trackpoint =
|
||||||
|
''
|
||||||
task = true;
|
${config.systemd.package}/bin/udevadm trigger --attr-match=name="TPPS/2 IBM TrackPoint"
|
||||||
|
|
||||||
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