nixpkgs/nixos/modules/programs/adb.nix

30 lines
743 B
Nix
Raw Normal View History

2016-10-31 10:25:50 +00:00
{ config, lib, pkgs, ... }:
with lib;
{
meta.maintainers = [ maintainers.mic92 ];
###### interface
options = {
programs.adb = {
enable = mkOption {
default = false;
type = 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:
<code>users.users.alice.extraGroups = ["adbusers"];</code>
2016-10-31 10:25:50 +00:00
'';
};
};
};
###### implementation
config = mkIf config.programs.adb.enable {
services.udev.packages = [ pkgs.android-udev-rules ];
2018-12-05 20:55:01 +00:00
environment.systemPackages = [ pkgs.androidenv.androidPkgs_9_0.platform-tools ];
users.groups.adbusers = {};
2016-10-31 10:25:50 +00:00
};
}