From 2824a580dcb3e85775fac4abd006fa5ad4c5ef2f Mon Sep 17 00:00:00 2001
From: Sergey Mironov <ierton@gmail.com>
Date: Tue, 10 Jan 2012 01:47:48 +0400
Subject: [PATCH] synaptics: add 'additionalOptions' option

---
 modules/services/x11/hardware/synaptics.nix |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/modules/services/x11/hardware/synaptics.nix b/modules/services/x11/hardware/synaptics.nix
index 5541800..8602736 100644
--- a/modules/services/x11/hardware/synaptics.nix
+++ b/modules/services/x11/hardware/synaptics.nix
@@ -18,7 +18,7 @@ let cfg = config.services.xserver.synaptics; in
 
       dev = mkOption {
         default = null;
-	example = "/dev/input/event0";
+        example = "/dev/input/event0";
         description =
           ''
             Path for touchpad device.  Set to null to apply to any
@@ -46,6 +46,17 @@ let cfg = config.services.xserver.synaptics; in
         description = "Whether to enable vertical edge drag-scrolling.";
       };
 
+      additionalOptions = mkOption {
+        default = "";
+        example = ''
+          Option "RTCornerButton" "2"
+          Option "RBCornerButton" "3"
+		'';
+        description = ''
+          Additional options for synaptics touchpad driver.
+        '';
+      };
+
     };
 
   };
@@ -74,6 +85,7 @@ let cfg = config.services.xserver.synaptics; in
           Option "VertTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
           Option "HorizTwoFingerScroll" "${if cfg.twoFingerScroll then "1" else "0"}"
           Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}"
+          ${cfg.additionalOptions}
         EndSection
       '';
 
-- 
1.7.8

