From 368cb6b0d25db2ae23be42ad51584de059997e51 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 20 May 2024 16:10:21 +0200 Subject: refactor(sys): Modularize and move to `modules/system` or `pkgs` --- modules/system/services/adb/default.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 modules/system/services/adb/default.nix (limited to 'modules/system/services/adb') diff --git a/modules/system/services/adb/default.nix b/modules/system/services/adb/default.nix new file mode 100644 index 00000000..4055dbb1 --- /dev/null +++ b/modules/system/services/adb/default.nix @@ -0,0 +1,22 @@ +{ + 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"]; + }; +} -- cgit 1.4.1