1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-09-20 13:27:22 +02:00
nixos-hardware/framework/16-inch/common/default.nix
Tobias Mayer a7432ebaef framework/16-inch: Mark keyboard as internal for libinput
This addition tells libinput that the built-in keyboard is indeed
internal, allowing the "Disable-While-Typing" setting to take effect.

The method is explained at
https://linuxtouchpad.org/libinput/2022/05/07/disable-while-typing.html.
2024-07-24 16:48:33 +00:00

39 lines
1.3 KiB
Nix

{ lib, pkgs, ... }: {
imports = [
../../../common/pc/laptop
../../../common/pc/laptop/ssd
../../kmod.nix
../../framework-tool.nix
];
# Fix TRRS headphones missing a mic
# https://community.frame.work/t/headset-microphone-on-linux/12387/3
boot.extraModprobeConfig = lib.mkIf (lib.versionOlder pkgs.linux.version "6.6.8") ''
options snd-hda-intel model=dell-headset-multi
'';
# For fingerprint support
services.fprintd.enable = lib.mkDefault true;
# Custom udev rules
services.udev.extraRules = ''
# Ethernet expansion card support
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
'';
# Needed for desktop environments to detect/manage display brightness
hardware.sensor.iio.enable = lib.mkDefault true;
# Enable keyboard customization
hardware.keyboard.qmk.enable = lib.mkDefault true;
# Allow `services.libinput.touchpad.disableWhileTyping` to work correctly.
# Set unconditionally because libinput can also be configured dynamically via
# gsettings.
environment.etc."libinput/local-overrides.quirks".text = ''
[Serial Keyboards]
MatchUdevType=keyboard
MatchName=Framework Laptop 16 Keyboard Module - ANSI Keyboard
AttrKeyboardIntegration=internal
'';
}