nixos-conf/modules/hardware/keychron-q11.nix

25 lines
559 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}:
let
2025-07-06 03:22:09 +03:00
cfg = config.custom.hardware.keychron;
in
{
2025-07-06 03:22:09 +03:00
options.custom.hardware.keychron.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; if config.services.xserver.enable then [ via ] else [ ];
# Keychron Q11
services.udev.extraRules = ''
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="01e0", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
'';
};
}