Skip to content

fix(NixOS): check nix paths for binaries in udev hiding rules#541

Merged
ShadowApex merged 1 commit intomainfrom
shadowapex/fix-nix-hiding
Mar 4, 2026
Merged

fix(NixOS): check nix paths for binaries in udev hiding rules#541
ShadowApex merged 1 commit intomainfrom
shadowapex/fix-nix-hiding

Conversation

@ShadowApex
Copy link
Contributor

Since adding the devnode moving logic, inputplumber would fail in finding the correct binary paths for chmod and mv. This change fixes that by checking for the binaries in NixOS paths. Otherwise it will try to use the which built-in shell command to discover the path.

WARN  inputplumber::input::composite_device] Failed to hide device '/dev/input/event4': Os { code: 2, kind: NotFound }

@ShadowApex ShadowApex requested a review from pastaq March 4, 2026 05:42
@ShadowApex ShadowApex merged commit 47c5b24 into main Mar 4, 2026
6 checks passed
@ShadowApex ShadowApex deleted the shadowapex/fix-nix-hiding branch March 4, 2026 14:48
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

🎉 This PR is included in version 0.75.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Pandapip1
Copy link
Contributor

Wouldn't the better approach be for InputPlumber itself to traverse through the path everywhere instead of using some hardcoded paths and if that fails shelling out? This should be relatively trivial to implement ourselves, or there's this crate if you're okay with adding another dependency.

@Pandapip1
Copy link
Contributor

Pandapip1 commented Mar 5, 2026

Also, completely separately: why is the chmod command needed in the udev rule if we're setting MODE="000" anyway? I'm sure there's a good reason, but I'd appreciate a comment explaining that.

Thank you both on your work on InputPlumber and making sure it works on NixOS!

@ShadowApex
Copy link
Contributor Author

@Pandapip1

Wouldn't the better approach be for InputPlumber itself to traverse through the path everywhere instead of using some hardcoded paths and if that fails shelling out? This should be relatively trivial to implement ourselves, or there's this crate if you're okay with adding another dependency.

You're absolutely right, that is a much better solution 😄 . Since this is relatively trivial to implement (parse PATH and check if binary exists at each path) I would much rather just implement this logic ourselves instead of adding a new dependency. If you would like to add this an open a PR for it, we will accept it. Otherwise I will try and add this myself in the next few days. Thanks!

Also, completely separately: why is the chmod command needed in the udev rule if we're setting MODE="000" anyway? I'm sure there's a good reason, but I'd appreciate a comment explaining that.

Thank you both on your work on InputPlumber and making sure it works on NixOS!

Thanks for your comments! In our testing, we found that just setting MODE="000" was not sufficient for actually setting the permissions on the device for reasons we're still not fully sure about. We suspect that other rules are overriding the mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants