anchor.diff:  
       services.udev.packages = [ pkgs.libinput.out ];
   
  -    services.xserver.config =
  -      ''
  -        # General libinput configuration.
  -        # See CONFIGURATION DETAILS section of man:libinput(4).
  -        Section "InputClass"
  -          Identifier "libinputConfiguration"
  -          MatchDriver "libinput"
  -          ${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''}
  -          Option "AccelProfile" "${cfg.accelProfile}"
  -          ${optionalString (cfg.accelSpeed != null) ''Option "AccelSpeed" "${cfg.accelSpeed}"''}
  -          ${optionalString (cfg.buttonMapping != null) ''Option "ButtonMapping" "${cfg.buttonMapping}"''}
  -          ${optionalString (cfg.calibrationMatrix != null) ''Option "CalibrationMatrix" "${cfg.calibrationMatrix}"''}
  -          ${optionalString (cfg.clickMethod != null) ''Option "ClickMethod" "${cfg.clickMethod}"''}
  -          Option "LeftHanded" "${xorgBool cfg.leftHanded}"
  -          Option "MiddleEmulation" "${xorgBool cfg.middleEmulation}"
  -          Option "NaturalScrolling" "${xorgBool cfg.naturalScrolling}"
  -          ${optionalString (cfg.scrollButton != null) ''Option "ScrollButton" "${toString cfg.scrollButton}"''}
  -          Option "ScrollMethod" "${cfg.scrollMethod}"
  -          Option "HorizontalScrolling" "${xorgBool cfg.horizontalScrolling}"
  -          Option "SendEventsMode" "${cfg.sendEventsMode}"
  -          Option "Tapping" "${xorgBool cfg.tapping}"
  -          Option "TappingDragLock" "${xorgBool cfg.tappingDragLock}"
  -          Option "DisableWhileTyping" "${xorgBool cfg.disableWhileTyping}"
  -          ${cfg.additionalOptions}
  -        EndSection
  -      '';
  +    services.xserver.inputClassSections = [
  +      (mkX11ConfigForDevice "mouse" "Pointer")
  +      (mkX11ConfigForDevice "touchpad" "Touchpad")
  +    ];
   
       assertions = [
         # already present in synaptics.nix
  
positive.code:           Option "DragLockButtons" "L1 B1 L2 B2"
          '';
          description = ''
            Additional options for libinput touchpad driver. See
            <citerefentry><refentrytitle>libinput</refentrytitle><manvolnum>4</manvolnum></citerefentry>
            for available options.";
          '';
        };
  
      };
  
    };
  
  
  
negative.code: with lib;
  
  let cfg = config.services.xserver.libinput;
  
      xorgBool = v: if v then "on" else "off";
  
      mkConfigForDevice = deviceType: {
        dev = mkOption {
          type = types.nullOr types.str;
          default = null;
          example = "/dev/input/event0";
          description =
            ''
              Path for ${deviceType} device.  Set to null to apply to any
              auto-detected ${deviceType}.
            '';
        };
  
  