hosts/base/hardware.nix
fruchti 44c073c07c Add udev rules for Keychron C2
Without these, the function keys don’t work as function keys, but only
as media keys.
2023-03-12 12:56:33 +01:00

8 lines
260 B
Nix

{ pkgs, ... }:
{
services.udev.extraRules = ''
# Keychron C2 function key fix
SUBSYSTEMS=="input", ATTRS{name}==Keychron C2", RUN+="${pkgs.coreutils}/bin/echo 0 | ${pkgs.coreutils}/bin/tee /sys/module/hid_apple/parameters/fnmode"
'';
}