diff options
Diffstat (limited to 'nixos/modules/services/x11/hardware')
-rw-r--r-- | nixos/modules/services/x11/hardware/libinput.nix | 29 | ||||
-rw-r--r-- | nixos/modules/services/x11/hardware/synaptics.nix | 7 |
2 files changed, 28 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)."; + } */ + ]; + }; } diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix index e74b19c8e710..5c068e89dd71 100644 --- a/nixos/modules/services/x11/hardware/synaptics.nix +++ b/nixos/modules/services/x11/hardware/synaptics.nix @@ -205,6 +205,13 @@ in { EndSection ''; + assertions = [ + { + assertion = !config.services.xserver.libinput.enable; + message = "Synaptics and libinput are incompatible, you cannot enable both (in services.xserver)."; + } + ]; + }; } |