From 50103723abbd3bd05a33f5b68869a33d14403728 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Thu, 30 Jan 2025 10:45:01 -0500 Subject: [PATCH] calibrate itsd --- nixos/machines/crash/configuration.nix | 34 +++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/nixos/machines/crash/configuration.nix b/nixos/machines/crash/configuration.nix index 2da5e5c..6a49499 100644 --- a/nixos/machines/crash/configuration.nix +++ b/nixos/machines/crash/configuration.nix @@ -160,12 +160,40 @@ wl-clipboard ]; + # We need to use a fork of iptsd for the LiftTimeout option + # https://github.com/linux-surface/iptsd/issues/166#issuecomment-2391567615 + nixpkgs.overlays = let + iptsd_overlay = self: super: { + iptsd = super.iptsd.overrideAttrs (prev: { + src = pkgs.fetchFromGitHub { + owner = "wvffle"; + repo = "iptsd"; + rev = "9c3e4c7b85767a3239bb2ba1ee12430ba5c92a86"; + hash = "sha256-wyCstqTpyFDLRe/AGFrjJi9A+txwkFNbsW4KLNcMf1Q="; + }; + }); + }; + in [iptsd_overlay]; # Setup iptsd for touch and stylus support services.iptsd = { enable = true; - config.Touchscreen = { - # DisableOnPalm = true; - DisableOnStylus = true; + config = { + Touchscreen = { + DisableOnPalm = true; + DisableOnStylus = true; + }; + Contacts = { + SizeMin = "0.775"; + SizeMax = "1.710"; + AspectMin = "1.005"; + AspectMax = "1.470"; + }; + Stylus = { + LiftTimeout = "0.07"; + }; + DFT = { + PositionMinAmp = "10"; + }; }; };