summary refs log tree commit diff
path: root/nixos/modules/services/x11/hardware/libinput.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-08-12 09:46:53 +0000
committerRobin Gloster <mail@glob.in>2016-08-12 09:46:53 +0000
commitb7787d932ec9cbd82ea6bc7c69d8df159b606fdc (patch)
treec4b6af2e6b49732ce5c6982cb8512ce9b7f1f34d /nixos/modules/services/x11/hardware/libinput.nix
parentbc025e83bd6c44df38851ef23da53359a0e62841 (diff)
parent532b2222965377e77ed884c463ee2751fb51dba3 (diff)
downloadnixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar
nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.gz
nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.bz2
nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.lz
nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.xz
nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.tar.zst
nixlib-b7787d932ec9cbd82ea6bc7c69d8df159b606fdc.zip
Merge remote-tracking branch 'upstream/master' into hardened-stdenv
Diffstat (limited to 'nixos/modules/services/x11/hardware/libinput.nix')
-rw-r--r--nixos/modules/services/x11/hardware/libinput.nix29
1 files changed, 21 insertions, 8 deletions
diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix
index 14c7131e611c..b358550ba41d 100644
--- a/nixos/modules/services/x11/hardware/libinput.nix
+++ b/nixos/modules/services/x11/hardware/libinput.nix
@@ -25,16 +25,21 @@ in {
 
       accelProfile = mkOption {
         type = types.enum [ "flat" "adaptive" ];
-        default = "flat";
-        example = "adaptive";
+        default = "adaptive";
+        example = "flat";
         description =
           ''
-            Sets  the pointer acceleration profile to the given profile. Permitted values are adaptive, flat.
-            Not all devices support this option or all profiles. If a profile is unsupported, the default profile
-            for this is used. For a description on the profiles and their behavior, see the libinput documentation.
+            Sets  the pointer acceleration profile to the given profile.
+            Permitted values are adaptive, flat.
+            Not all devices support this option or all profiles.
+            If a profile is unsupported, the default profile for this is used.
+            <literal>flat</literal>: Pointer motion is accelerated by a constant
+            (device-specific) factor, depending on the current speed.
+            <literal>adaptive</literal>: Pointer acceleration depends on the input speed.
+            This is the default profile for most devices.
           '';
-      };    
-      
+      };
+
       accelSpeed = mkOption {
         type = types.nullOr types.string;
         default = null;
@@ -216,7 +221,7 @@ in {
           Option "LeftHanded" "${xorgBool cfg.leftHanded}"
           Option "MiddleEmulation" "${xorgBool cfg.middleEmulation}"
           Option "NaturalScrolling" "${xorgBool cfg.naturalScrolling}"
-          ${optionalString (cfg.scrollButton != null) ''Option "ScrollButton" "${cfg.scrollButton}"''}
+          ${optionalString (cfg.scrollButton != null) ''Option "ScrollButton" "${toString cfg.scrollButton}"''}
           Option "ScrollMethod" "${cfg.scrollMethod}"
           Option "HorizontalScrolling" "${xorgBool cfg.horizontalScrolling}"
           Option "SendEventsMode" "${cfg.sendEventsMode}"
@@ -227,6 +232,14 @@ in {
         EndSection
       '';
 
+    assertions = [
+      # already present in synaptics.nix
+      /* {
+        assertion = !config.services.xserver.synaptics.enable;
+        message = "Synaptics and libinput are incompatible, you cannot enable both (in services.xserver).";
+      } */
+    ];
+
   };
 
 }