Seeking an Elegant Solution: How to Disable Internal Keyboard on NixOS (Wayland)?

Hey everyone,

I recently came across a manual method to disable the internal keyboard on NixOS (Wayland) using this link. While this method works, I’m curious if there’s a more elegant solution within the NixOS configuration.

Is there a way to define a specific command or configuration in NixOS that gracefully disables the internal keyboard? I’m looking for a cleaner and more integrated solution that aligns with the NixOS philosophy.

Your insights and suggestions are highly appreciated!

Thanks in advance.

That’s just a udev rule. Here’s an example from my config, I use it to disable a piece of hardware that incorrectly inhibits sleep: https://github.com/TLATER/dotfiles/blob/444a85b014ad86dc5a9fa9e5e38c585dcb7958f7/nixos-config/yui/default.nix#L73