diff options
author | Freya Murphy <freya@freyacat.org> | 2025-08-21 23:36:57 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-08-21 23:36:57 -0400 |
commit | f1e443f4fbc6a442e93e39df89b91960bac05784 (patch) | |
tree | 17c7494202e13357b315ff14873226149f23c0fe | |
parent | update commits (diff) | |
download | dotfiles-nix-f1e443f4fbc6a442e93e39df89b91960bac05784.tar.gz dotfiles-nix-f1e443f4fbc6a442e93e39df89b91960bac05784.tar.bz2 dotfiles-nix-f1e443f4fbc6a442e93e39df89b91960bac05784.zip |
logi usb dongle udev rules
-rw-r--r-- | hosts/shinji/42-logitech-unify-permissions.rules | 31 | ||||
-rw-r--r-- | hosts/shinji/default.nix | 6 |
2 files changed, 36 insertions, 1 deletions
diff --git a/hosts/shinji/42-logitech-unify-permissions.rules b/hosts/shinji/42-logitech-unify-permissions.rules new file mode 100644 index 0000000..e52c9b0 --- /dev/null +++ b/hosts/shinji/42-logitech-unify-permissions.rules @@ -0,0 +1,31 @@ +# This rule was added by Solaar. +# +# Allows non-root users to have raw access to Logitech devices. +# Allowing users to write to the device is potentially dangerous +# because they could perform firmware updates. + +ACTION != "add", GOTO="solaar_end" +SUBSYSTEM != "hidraw", GOTO="solaar_end" + +# USB-connected Logitech receivers and devices +ATTRS{idVendor}=="046d", GOTO="solaar_apply" + +# Lenovo nano receiver +ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6042", GOTO="solaar_apply" + +# Bluetooth-connected Logitech devices +KERNELS == "0005:046D:*", GOTO="solaar_apply" + +GOTO="solaar_end" + +LABEL="solaar_apply" + +# Allow any seated user to access the receiver. +# uaccess: modern ACL-enabled udev +TAG+="uaccess" + +# Grant members of the "plugdev" group access to receiver (useful for SSH users) +#MODE="0660", GROUP="plugdev" + +LABEL="solaar_end" +# vim: ft=udevrules diff --git a/hosts/shinji/default.nix b/hosts/shinji/default.nix index ffc9d6b..0b30d04 100644 --- a/hosts/shinji/default.nix +++ b/hosts/shinji/default.nix @@ -1,6 +1,6 @@ # Shinji # System configuration for my laptop -{pkgs, ...}: { +{lib, pkgs, ...}: { imports = [ ./hardware.nix ./sops.nix @@ -22,6 +22,9 @@ HandlePowerKey=suspend ''; + # logitech mouse udev + services.udev.extraRules = lib.fileContents ./42-logitech-unify-permissions.rules; + # packages environment.systemPackages = with pkgs; [ # wine @@ -33,6 +36,7 @@ # misc foliate jami + solaar qbittorrent ]; |