From 7c90c1540585c28dfc0389c717bbdd5e1ef47b82 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sun, 17 Sep 2023 11:26:11 +0200 Subject: feat(sys/srvs/adb): Init --- sys/svcs/adb/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sys/svcs/adb/default.nix (limited to 'sys/svcs/adb/default.nix') diff --git a/sys/svcs/adb/default.nix b/sys/svcs/adb/default.nix new file mode 100644 index 00000000..42eefcb8 --- /dev/null +++ b/sys/svcs/adb/default.nix @@ -0,0 +1,23 @@ +{ + 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