1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
nixpkgs/nixos/modules/programs/adb.nix

28 lines
709 B
Nix

{ config, lib, pkgs, ... }:
{
meta.maintainers = [ lib.maintainers.mic92 ];
###### interface
options = {
programs.adb = {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
description = ''
Whether to configure system to use Android Debug Bridge (adb).
To grant access to a user, it must be part of adbusers group:
`users.users.alice.extraGroups = ["adbusers"];`
'';
};
};
};
###### implementation
config = lib.mkIf config.programs.adb.enable {
services.udev.packages = [ pkgs.android-udev-rules ];
environment.systemPackages = [ pkgs.android-tools ];
users.groups.adbusers = {};
};
}