about summary refs log blame commit diff stats
path: root/sys/svcs/adb/default.nix
blob: 4055dbb1a816c5d91cc4915836f9c04a50c11161 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17















                                                             


                                                         
 
{
  lib,
  config,
  ...
}: let
  cfg = config.soispha.adb;
in {
  options.soispha.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"];
  };
}