nixpkgs/nixos/modules/programs/adb.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
709 B
Nix
Raw Normal View History

2016-10-31 10:25:50 +00:00
{ config, lib, pkgs, ... }:
{
meta.maintainers = [ lib.maintainers.mic92 ];
2016-10-31 10:25:50 +00:00
###### interface
options = {
programs.adb = {
enable = lib.mkOption {
2016-10-31 10:25:50 +00:00
default = false;
type = lib.types.bool;
2016-10-31 10:25:50 +00:00
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"];`
2016-10-31 10:25:50 +00:00
'';
};
};
};
###### implementation
config = lib.mkIf config.programs.adb.enable {
2016-10-31 10:25:50 +00:00
services.udev.packages = [ pkgs.android-udev-rules ];
environment.systemPackages = [ pkgs.android-tools ];
users.groups.adbusers = {};
2016-10-31 10:25:50 +00:00
};
}