{ pkgs, lib, config, ... }: with lib; let cfg = config.global.android; in { options.global.android = { enable = mkEnableOption "android tools"; }; config = mkIf cfg.enable { programs.adb.enable = true; # allow device access by admin users users.adminGroups = [ "adbusers" ]; }; }