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

Closed
wants to merge 1 commit into from

Conversation

davidtwco
Copy link
Member

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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.

@stale
Copy link

stale bot commented Apr 18, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 18, 2022
@davidtwco davidtwco mentioned this pull request Jun 18, 2022
13 tasks
@davidtwco davidtwco closed this Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants