Compare commits

..

No commits in common. "a25ec4ae258d229a4a2c34f015b754784b959c8d" and "a39c41ce903ab7f8bac9c1a0e6761ce7d5f7cfc3" have entirely different histories.

3 changed files with 1 additions and 41 deletions

View file

@ -1,7 +1,7 @@
{
imports = [
./borg
./fingerprint-reader-on-laptop-lid
./fingerprint-laptop-lid.nix
./impermanence.nix
./incus
./motd

View file

@ -11,7 +11,6 @@
# ID 27c6:609c Shenzhen Goodix Technology Co.,Ltd
# On Framework 16 the USB is:
# Bus 005 Device 007: ID 27c6:609c Shenzhen Goodix Technology Co.,Ltd
# Use `findfp.sh` to find the correct USB device.
{ config, lib, pkgs, ... }:
let
cfg = config.mySystem.system.fingerprint-reader-on-laptop-lid;

View file

@ -1,39 +0,0 @@
#!/usr/bin/env bash
find_usb_device() {
local idVendor=$1
local idProduct=$2
local device_id="${idVendor}:${idProduct}"
for device in /sys/bus/usb/devices/*; do
if [ -f "$device/idVendor" ] && [ -f "$device/idProduct" ]; then
vendor=$(cat "$device/idVendor")
product=$(cat "$device/idProduct")
if [ "${vendor}:${product}" = "$device_id" ]; then
echo "$device"
return 0
fi
fi
done
return 1
}
# Example usage
idVendor="27c6"
idProduct="609c"
device_path=$(find_usb_device "$idVendor" "$idProduct")
if [ -n "$device_path" ]; then
echo "Device found at: $device_path"
# Print additional information
manufacturer=$(cat "$device_path/manufacturer" 2>/dev/null)
product=$(cat "$device_path/product" 2>/dev/null)
echo "Manufacturer: ${manufacturer:-N/A}"
echo "Product: ${product:-N/A}"
else
echo "Device not found"
fi