mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-08 19:46:10 +01:00
Use the upstream libinput keyboard detection quirks configuration to ensure Framework 16 laptop keyboards are detected and treated as internal keyboards. Notably, this means that non-ANSI Framework keyboards are correctly detected and treated as being internal keyboards rather than external ones. Also add a comment noting that this configuration is part of more recent upstream libinput releases, and that it can be removed once we no longer need to support older versions of libinput. That probably means once NixOS 24.05 is out of support.
45 lines
1.6 KiB
Nix
45 lines
1.6 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.
|
|
#
|
|
# This is extracted from the quirks file that is in the upstream libinput
|
|
# source. Once we can assume everyone is on at least libinput 1.26.0, this
|
|
# local override file can be removed.
|
|
# https://gitlab.freedesktop.org/libinput/libinput/-/commit/566857bd98131009699c9ab6efc7af37afd43fd0
|
|
environment.etc."libinput/local-overrides.quirks".text = ''
|
|
[Framework Laptop 16 Keyboard Module]
|
|
MatchName=Framework Laptop 16 Keyboard Module*
|
|
MatchUdevType=keyboard
|
|
MatchDMIModalias=dmi:*svnFramework:pnLaptop16*
|
|
AttrKeyboardIntegration=internal
|
|
'';
|
|
}
|