anchor.diff:        services.xserver.inputClassSections =
           [''
           Identifier "Trackpoint Wheel Emulation"
  -          MatchProduct "${if cfg.fakeButtons then "PS/2 Generic Mouse" else "ETPS/2 Elantech TrackPoint|Elantech PS/2 TrackPoint|TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device|Composite TouchPad / TrackPoint"}"
  +          MatchProduct "${if cfg.fakeButtons then "PS/2 Generic Mouse" else "ETPS/2 Elantech TrackPoint|Elantech PS/2 TrackPoint|TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device|Composite TouchPad / TrackPoint|${cfg.device}"}"
             MatchDevicePath "/dev/input/event*"
             Option "EmulateWheel" "true"
             Option "EmulateWheelButton" "2"
  
positive.code:         '';
        };
  
      };
  
    };
  
negative.code:     (mkIf cfg.enable {
        services.udev.extraRules =
        ''
          ACTION=="add|change", SUBSYSTEM=="input", ATTR{name}=="${cfg.device}", ATTR{device/speed}="${toString cfg.speed}", ATTR{device/sensitivity}="${toString cfg.sensitivity}"
        '';
  
        system.activationScripts.trackpoint =
          ''
            ${config.systemd.package}/bin/udevadm trigger --attr-match=name="${cfg.device}"
          '';
      })
  
  