diff options
author | Jascha Geerds <jg@ekby.de> | 2014-07-25 13:22:33 +0200 |
---|---|---|
committer | Jascha Geerds <jg@ekby.de> | 2014-07-25 14:01:06 +0200 |
commit | 49e6ef2a19161ffbbdede9451bf22b0d33cd71cb (patch) | |
tree | 7a2fe42a80da75c7847974ad99e57aab45aad1af /nixos/modules/tasks/trackpoint.nix | |
parent | 0852d9e3643458ebd435b366bb3ecd79b0f47400 (diff) |
Fix trackpoint configuration on some systems
Diffstat (limited to 'nixos/modules/tasks/trackpoint.nix')
-rw-r--r-- | nixos/modules/tasks/trackpoint.nix | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/nixos/modules/tasks/trackpoint.nix b/nixos/modules/tasks/trackpoint.nix index 4be2c3eb4c47..25ada145ac69 100644 --- a/nixos/modules/tasks/trackpoint.nix +++ b/nixos/modules/tasks/trackpoint.nix @@ -54,10 +54,17 @@ with lib; 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 + for directory in /sys/devices/platform/i8042/serio1 \ + /sys/devices/platform/i8042/serio1/serio2 \ + /sys/devices/platform/i8042/serio4/serio5; do + if [ -e "$directory/speed" ]; then + echo -n ${toString config.hardware.trackpoint.speed} \ + > "$directory/speed" + echo -n ${toString config.hardware.trackpoint.sensitivity} \ + > "$directory/sensitivity" + break + fi + done ''; }; |