@@ -163,6 +163,15 @@ let cfg = config.services.xserver.libinput;
163163 '';
164164 };
165165
166+ transformationMatrix = mkOption {
167+ type = types.nullOr types.str;
168+ default = null;
169+ description = ''
170+ A string of 9 space-separated floating point numbers. Sets the transformation matrix to
171+ the 3x3 matrix where the first row is (abc), the second row is (def) and the third row is (ghi).
172+ '';
173+ };
174+
166175 disableWhileTyping = mkOption {
167176 type = types.bool;
168177 default = false;
@@ -196,6 +205,7 @@ let cfg = config.services.xserver.libinput;
196205 ${optionalString (cfg.${deviceType}.accelSpeed != null) ''Option "AccelSpeed" "${cfg.${deviceType}.accelSpeed}"''}
197206 ${optionalString (cfg.${deviceType}.buttonMapping != null) ''Option "ButtonMapping" "${cfg.${deviceType}.buttonMapping}"''}
198207 ${optionalString (cfg.${deviceType}.calibrationMatrix != null) ''Option "CalibrationMatrix" "${cfg.${deviceType}.calibrationMatrix}"''}
208+ ${optionalString (cfg.${deviceType}.transformationMatrix != null) ''Option "TransformationMatrix" "${cfg.${deviceType}.transformationMatrix}"''}
199209 ${optionalString (cfg.${deviceType}.clickMethod != null) ''Option "ClickMethod" "${cfg.${deviceType}.clickMethod}"''}
200210 Option "LeftHanded" "${xorgBool cfg.${deviceType}.leftHanded}"
201211 Option "MiddleEmulation" "${xorgBool cfg.${deviceType}.middleEmulation}"
@@ -227,6 +237,7 @@ in {
227237 "sendEventsMode"
228238 "tapping"
229239 "tappingDragLock"
240+ "transformationMatrix"
230241 "disableWhileTyping"
231242 "additionalOptions"
232243 ]);