diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2016-11-03 06:29:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-03 06:29:28 +0100 |
commit | 8085aff31572ad6180cd810387f2cbb0a28fd4ec (patch) | |
tree | a6e52e3a166166d5bffbc29006e9d2de5b094de7 /nixos | |
parent | a94bd88d7af53b2052035a76eaf474047a5ac614 (diff) | |
parent | 08ebb422c52c61190346f5289f7e918a8fd7f115 (diff) | |
download | nixlib-8085aff31572ad6180cd810387f2cbb0a28fd4ec.tar nixlib-8085aff31572ad6180cd810387f2cbb0a28fd4ec.tar.gz nixlib-8085aff31572ad6180cd810387f2cbb0a28fd4ec.tar.bz2 nixlib-8085aff31572ad6180cd810387f2cbb0a28fd4ec.tar.lz nixlib-8085aff31572ad6180cd810387f2cbb0a28fd4ec.tar.xz nixlib-8085aff31572ad6180cd810387f2cbb0a28fd4ec.tar.zst nixlib-8085aff31572ad6180cd810387f2cbb0a28fd4ec.zip |
Merge pull request #20015 from Mic92/adb
adb: init module
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/adb.nix | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 61596265124a..08d739704080 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -61,6 +61,7 @@ ./misc/nixpkgs.nix ./misc/passthru.nix ./misc/version.nix + ./programs/adb.nix ./programs/atop.nix ./programs/bash/bash.nix ./programs/blcr.nix diff --git a/nixos/modules/programs/adb.nix b/nixos/modules/programs/adb.nix new file mode 100644 index 000000000000..9ba81899e588 --- /dev/null +++ b/nixos/modules/programs/adb.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + meta.maintainers = [ maintainers.mic92 ]; + + ###### interface + options = { + programs.adb = { + enable = mkOption { + default = false; + example = true; + 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.extraUsers.alice.extraGroups = ["adbusers"];</code> + ''; + }; + }; + }; + + ###### implementation + config = mkIf config.programs.adb.enable { + services.udev.packages = [ pkgs.android-udev-rules ]; + environment.systemPackages = [ pkgs.androidenv.platformTools ]; + users.extraGroups.adbusers = {}; + }; +} |