{ config, lib, pkgs, ... }:
{
    environment.systemPackages = with pkgs; [
        picocom
        usbutils  # lsusb etc.
        binwalk
    ];

    systemd.services.ModemManager.enable = lib.mkForce false;

    users.extraGroups = {
        plugdev = {
            members = [ "fruchti" ];
        };
    };

    services.udev.extraRules = ''
        # ESP32 devkit USB-serial
        SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", MODE="0660", GROUP="plugdev"

        # Prolific USB-TTL
        SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE="0660", GROUP="plugdev"

        # OpenBench Logic Sniffer
        SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fc92", MODE="0660", GROUP="plugdev", SYMLINK+="OpenLogicSniffer"

        # ST-LINK/V2
        SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="3748", MODE="0660", GROUP="plugdev"
    '';
}
