1
0
Fork 0

Dimaga, Shura: add libinput quirks to detect keyboards as internal

This commit is contained in:
Aires 2024-08-23 10:56:14 -04:00
parent bbc18de5af
commit b59a89cb4c
4 changed files with 81 additions and 3 deletions

View file

@ -313,11 +313,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1724242322,
"narHash": "sha256-HMpK7hNjhEk4z5SFg5UtxEio9OWFocHdaQzCfW1pE7w=",
"lastModified": 1724316499,
"narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "224042e9a3039291f22f4f2ded12af95a616cca0",
"rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841",
"type": "github"
},
"original": {

View file

@ -52,4 +52,21 @@ in
};
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# Detect keyboard as "internal" so we can automatically disable the touchpad while typing
# If this doesn't work, try changing "MatchName" to "AT Raw Set 2 keyboard"
environment.etc."libinput/keyboard-touchpard.quirks" = {
mode = "0600";
text = ''
[Microsoft Surface Type Cover Touchpad]
MatchUdevType=touchpad
MatchName=*Microsoft Surface Type Cover Touchpad
AttrKeyboardIntegration=internal
[Microsoft Surface Type Cover Keyboard]
MatchUdevType=keyboard
MatchName=*Microsoft Surface Type Cover Keyboard
AttrKeyboardIntegration=internal
'';
};
}

View file

@ -39,4 +39,16 @@ in
size = 16384;
};
};
# Detect keyboard as "internal" so we can automatically disable the touchpad while typing
# If this doesn't work, try changing "MatchName" to "AT Raw Set 2 keyboard"
environment.etc."libinput/keyboard-touchpard.quirks" = {
mode = "0600";
text = ''
[Serial Keyboards]
MatchUdevType=keyboard
MatchName=ITE Tech. Inc. ITE Device(8258) Keyboard
AttrKeyboardIntegration=internal
'';
};
}

49
overlays/mesa-latest.nix Normal file
View file

@ -0,0 +1,49 @@
{
config,
pkgs,
lib,
...
}:
{
nixpkgs.overlays = [
(self: super: {
mesa = super.callPackage (
{ lib, fetchurl }:
rec {
pname = "mesa";
version = "24.1.4";
src = fetchurl {
urls = [
"https://archive.mesa3d.org/mesa-${version}.tar.xz"
"https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
];
hash = "sha256-QJGDtgkLChOJP13v2Yl4NpeY8NUtheqWLN1HDkOLboU=";
};
meta = {
description = "Open source 3D graphics library";
longDescription = ''
The Mesa project began as an open-source implementation of the OpenGL
specification - a system for rendering interactive 3D graphics. Over the
years the project has grown to implement more graphics APIs, including
OpenGL ES (versions 1, 2, 3), OpenCL, OpenMAX, VDPAU, VA API, XvMC, and
Vulkan. A variety of device drivers allows the Mesa libraries to be used
in many different environments ranging from software emulation to
complete hardware acceleration for modern GPUs.
'';
homepage = "https://www.mesa3d.org/";
changelog = "https://www.mesa3d.org/relnotes/${version}.html";
license = with lib.licenses; [ mit ]; # X11 variant, in most files
platforms = lib.platforms.mesaPlatforms;
maintainers = with lib.maintainers; [
primeos
vcunat
]; # Help is welcome :)
};
}
) { };
})
];
}