kenji

kenji / bade nixos udev rules

Last active 2 weeks ago

Like 0

kenji revised this gist 2 weeks ago · 43cbc40

1 file changed, 10 deletions

udev.nix
@@ -2,14 +2,4 @@ services.udev.extraRules = ''
2 2 # BH 2026 Badge start
3 3 ATTRS{idVendor}=="1915", ATTRS{idProduct}=="521f", MODE="660", GROUP="plugdev", TAG+="uaccess"
4 4 # BH 2026 Badge end
5 -
6 - # Instantiate the LSM6DSO on the MCP2221 USB-I2C bridge.
7 - ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="MCP2221 usb-i2c bridge", ATTR{new_device}="lsm6dso 0x6a"
8 -
9 - # Grant the seat user the LSM6DSO buffered interface: the char device readable,
10 - # and the scan/buffer/trigger sysfs attrs (root:root 0644 by default) writable.
11 - SUBSYSTEM=="iio", KERNEL=="iio:device*", ATTR{name}=="lsm6dso*", \
12 - GROUP="input", MODE="0660", \
13 - RUN+="${pkgs.coreutils}/bin/chgrp -R input /sys%p", \
14 - RUN+="${pkgs.coreutils}/bin/chmod -R g+rwX /sys%p"'';
15 5 ''

kenji revised this gist 2 weeks ago · ef4bf9c

2 files changed, 15 insertions, 3 deletions

paste.txt (file deleted)
@@ -1,3 +0,0 @@
1 - # BH 2026 Badge start
2 - ATTRS{idVendor}=="1915", ATTRS{idProduct}=="521f", MODE="660", GROUP="plugdev", TAG+="uaccess"
3 - # BH 2026 Badge end
udev.nix (file created)
@@ -0,0 +1,15 @@
1 + services.udev.extraRules = ''
2 + # BH 2026 Badge start
3 + ATTRS{idVendor}=="1915", ATTRS{idProduct}=="521f", MODE="660", GROUP="plugdev", TAG+="uaccess"
4 + # BH 2026 Badge end
5 +
6 + # Instantiate the LSM6DSO on the MCP2221 USB-I2C bridge.
7 + ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="MCP2221 usb-i2c bridge", ATTR{new_device}="lsm6dso 0x6a"
8 +
9 + # Grant the seat user the LSM6DSO buffered interface: the char device readable,
10 + # and the scan/buffer/trigger sysfs attrs (root:root 0644 by default) writable.
11 + SUBSYSTEM=="iio", KERNEL=="iio:device*", ATTR{name}=="lsm6dso*", \
12 + GROUP="input", MODE="0660", \
13 + RUN+="${pkgs.coreutils}/bin/chgrp -R input /sys%p", \
14 + RUN+="${pkgs.coreutils}/bin/chmod -R g+rwX /sys%p"'';
15 + ''

kenji revised this gist 2 weeks ago · cd425e1

1 file changed, 3 insertions

paste.txt (file created)
@@ -0,0 +1,3 @@
1 + # BH 2026 Badge start
2 + ATTRS{idVendor}=="1915", ATTRS{idProduct}=="521f", MODE="660", GROUP="plugdev", TAG+="uaccess"
3 + # BH 2026 Badge end