about summary refs log tree commit diff stats
path: root/modules/system/services/adb/default.nix
blob: ec5d4be6c4f2f594550319b816d4d47c61536edf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
  lib,
  config,
  ...
}: let
  cfg = config.soispha.services.adb;
in {
  options.soispha.services.adb = {
    enable = lib.mkEnableOption "Android adb bridge";
    user = lib.mkOption {
      type = lib.types.str;
      example = "soispha";
      default = "soispha";
      description = "Username to grant access to adb bridge";
    };
  };

  config = lib.mkIf cfg.enable {
    programs.adb.enable = true;
    users.users."${cfg.user}".extraGroups = ["adbusers"];
  };
}