From acf2240888c15ba78804ea0a0d73b458ee4ca881 Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Mon, 14 Apr 2025 13:45:59 -0400 Subject: [PATCH] Adds adb support with user group configuration - Introduces an optional module to enable adb - Integrates adb module into host configuration - Adds adbusers group membership to user settings --- hosts/common/optional/adb.nix | 5 +++++ hosts/nixos/rune/default.nix | 1 + hosts/users/default.nix | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 hosts/common/optional/adb.nix diff --git a/hosts/common/optional/adb.nix b/hosts/common/optional/adb.nix new file mode 100644 index 0000000..a9b7e21 --- /dev/null +++ b/hosts/common/optional/adb.nix @@ -0,0 +1,5 @@ +{ pkgs, config, ... }: +{ + programs.adb.enable = true; + users.users.${config.hostSpec.username}.extraGroups = [ "adbusers" ]; +} diff --git a/hosts/nixos/rune/default.nix b/hosts/nixos/rune/default.nix index 035cad8..72ba531 100644 --- a/hosts/nixos/rune/default.nix +++ b/hosts/nixos/rune/default.nix @@ -30,6 +30,7 @@ in ## Optional Configs ## "hosts/common/optional/audio.nix" # pipewire and cli controls + "hosts/common/optional/adb.nix" # android tools "hosts/common/optional/bluetooth.nix" "hosts/common/optional/ddcutil.nix" # ddcutil for monitor controls "hosts/common/optional/gaming.nix" # steam, gamescope, gamemode, and related hardware diff --git a/hosts/users/default.nix b/hosts/users/default.nix index 377effc..9f77ef1 100644 --- a/hosts/users/default.nix +++ b/hosts/users/default.nix @@ -30,11 +30,15 @@ in group = "ryot"; extraGroups = lib.flatten [ "wheel" + # Some of these groups are defined elsewhere in the system + # But honestly not sure what runs first so just add them here i guess (ifTheyExist [ + "adbusers" "audio" "docker" "gamemode" "git" + "libvirtd" "networkmanager" "video" ])