feat(modules): hardware modules — intel/amd/nvidia/audio/bluetooth/touchpad
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
0ca8dd3929
commit
620af4f502
8 changed files with 831 additions and 0 deletions
59
modules/hardware/touchpad.nix
Normal file
59
modules/hardware/touchpad.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
in
|
||||
{
|
||||
options.hardware.touchpad.enable = mkEnableOption "Enhanced touchpad support";
|
||||
|
||||
config = mkIf config.hardware.touchpad.enable {
|
||||
# Touchpad support via libinput
|
||||
services.libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
tapping = true;
|
||||
tappingDragLock = true;
|
||||
naturalScrolling = true;
|
||||
scrollMethod = "twofinger";
|
||||
disableWhileTyping = true;
|
||||
middleEmulation = true;
|
||||
accelProfile = "adaptive";
|
||||
};
|
||||
};
|
||||
|
||||
# Synaptics touchpad (alternative, disabled by default)
|
||||
services.xserver.synaptics = {
|
||||
enable = false;
|
||||
twoFingerScroll = true;
|
||||
palmDetect = true;
|
||||
tapButtons = true;
|
||||
buttonsMap = [
|
||||
1
|
||||
3
|
||||
2
|
||||
];
|
||||
fingersMap = [
|
||||
0
|
||||
0
|
||||
0
|
||||
];
|
||||
};
|
||||
|
||||
# Touchpad packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
libinput
|
||||
xinput
|
||||
xorg.xf86inputlibinput
|
||||
];
|
||||
|
||||
# Touchpad gesture support
|
||||
services.touchegg = {
|
||||
enable = false; # Disabled by default, enable if needed
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue