dotfiles/nixos/configs/lenovo-nfc-userland.nix
2024-11-07 16:25:41 -07:00

31 lines
652 B
Nix

#
# Configuration for Lenovo NFC readers.
#
{
deprekages,
config,
pkgs,
...
}:
{
# Provide libnfc for working with the hardware.
environment.systemPackages = [
deprekages.libnfc
];
# Build the kernel module that provides access to libnfc,
# and ensure it's preferred over hard NFC.
boot.extraModulePackages = [
(pkgs.callPackage ../../packages/linux-nfc-lenovo {
linuxPackages = config.boot.kernelPackages;
})
];
boot.blacklistedKernelModules = [
"nxp_nci"
"nxp_nci_i2c"
];
# Finally, ensure we have access to the device.
services.udev.packages = [ deprekages.linux-nfc-lenovo-udev-rules ];
}