Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/wooting: add xinput support #105370

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

@davidtwco
Copy link
Member

@davidtwco davidtwco commented Nov 29, 2020

Motivation for this change

This PR adds xinput support for Wooting keyboards to the hardware.wooting NixOS module, enabled by setting the hardware.wooting.xinput.enable option, see upstream documentation.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
udev rules that give NixOS permission to communicate with Wooting keyboards in xinput mode
'';
platforms = platforms.linux;
license = "unknown";
Copy link
Contributor

@jonringer jonringer May 19, 2021

if there's no license, I think we have to assume that it's unfree.

Copy link
Member Author

@davidtwco davidtwco May 25, 2021

Fixed!

# Source: https://wooting.helpscoutdocs.com/article/83-guide-configuring-xinput-support-for-the-wootings-under-linux
src = [ ./wooting-xinput.rules ];
Copy link
Contributor

@jonringer jonringer May 19, 2021

If you already vendored the text, you could probably use a trivial builder like writeTextFile

Copy link
Member Author

@davidtwco davidtwco May 25, 2021

I've left the rules in a separate file for now, and have added some new rules that were added (for new keyboard models) since this PR was made.

This commit adds xinput support for Wooting keyboards to the
`hardware.wooting` NixOS module, enabled by setting the
`hardware.wooting.xinput.enable` option.

Signed-off-by: David Wood <david@davidtw.co>
@doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Aug 17, 2021

I too think there's no need (at least in the meantime) to create a package just for the udev rules. And it'd be better to add them to the service directly. Also, there's a CI error now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants