all repos — nixfiles @ 45fcfe8435222078c2153f22b3f32d8bafb94633

System and user configuration, managed by nix and home-manager

x250: Use synaptics driver instead of libinput
Alan Pearce alan@alanpearce.eu
Sun, 10 Sep 2017 14:38:21 +0200
commit

45fcfe8435222078c2153f22b3f32d8bafb94633

parent

da93d42ee1b52155080fd5a46f33e96c7e8346d3

3 files changed, 25 insertions(+), 19 deletions(-)

jump to
M modules/laptop.nixmodules/laptop.nix
@@ -1,4 +1,4 @@-{ config, pkgs, ... }:
+{ config, pkgs, lib, ... }:
 
 { boot.kernelModules = [ "coretemp" ];
   boot.extraModulePackages = with config.boot.kernelPackages; [
@@ -62,7 +62,7 @@ ''; 
   services.xserver = {
     libinput = {
-      enable = true;
+      enable = lib.mkDefault true;
       naturalScrolling = true;
       disableWhileTyping = true;
     };
M modules/synaptics.nixmodules/synaptics.nix
@@ -1,24 +1,27 @@ { config, pkgs, ... }:
 
-{ services.xserver.synaptics = {
-    enable = true;
+{ services.xserver = {
+    libinput.enable = false;
+    synaptics = {
+      enable = true;
 
-    accelFactor = "0.001";
+      accelFactor = "0.05";
 
-    minSpeed = "0.4";
-    maxSpeed = "2.0";
+      minSpeed = "0.2";
+      maxSpeed = "1.0";
 
-    palmDetect = true;
-    palmMinWidth = 5;
-    palmMinZ = 20;
+      palmDetect = true;
+      palmMinWidth = 5;
+      palmMinZ = 20;
 
-    twoFingerScroll = true;
-    vertTwoFingerScroll = true;
-    horizTwoFingerScroll = true;
-    additionalOptions = ''
-      Option "RBCornerButton" "3"
-      Option "VertScrollDelta" "-111"
-      Option "HorizScrollDelta" "-111"
-    '';
+      twoFingerScroll = true;
+      vertTwoFingerScroll = true;
+      horizTwoFingerScroll = true;
+      additionalOptions = ''
+        Option "RBCornerButton" "3"
+        Option "VertScrollDelta" "-111"
+        Option "HorizScrollDelta" "-111"
+      '';
+    };
   };
 }
M modules/x250.nixmodules/x250.nix
@@ -1,6 +1,9 @@ { config, pkgs, ... }:
 
-{ boot.extraModulePackages = with config.boot.kernelPackages; [
+{ imports = [
+    ./synaptics.nix
+  ];
+  boot.extraModulePackages = with config.boot.kernelPackages; [
     acpi_call
   ];