nixdots/system/roles/laptop/touchpad.nix

29 lines
667 B
Nix
Raw Normal View History

2024-04-13 19:15:25 +00:00
{ lib, config, ...}: let
inherit (lib) mkIf;
deviceType = config.myOptions.device.roles.type;
acceptedTypes = ["laptop"];
in {
config = mkIf (builtins.elem deviceType acceptedTypes) {
2024-06-10 17:28:10 +00:00
services.libinput = {
2024-04-13 19:15:25 +00:00
# enable libinput
enable = true;
2024-04-13 18:56:51 +00:00
2024-04-13 19:15:25 +00:00
# disable mouse acceleration
mouse = {
accelProfile = "flat";
accelSpeed = "0";
middleEmulation = false;
};
2024-04-13 18:56:51 +00:00
2024-04-13 19:15:25 +00:00
# touchpad settings
touchpad = {
2024-06-10 17:28:10 +00:00
naturalScrolling = false; # I'm not natural
2024-04-13 19:15:25 +00:00
tapping = true;
clickMethod = "clickfinger";
horizontalScrolling = true;
disableWhileTyping = true;
};
2024-04-13 18:56:51 +00:00
};
};
}