add downgraded version of android-tools

This commit is contained in:
NullBite 2024-01-20 21:50:46 +01:00
parent f00a70047d
commit abe4903e6b
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
3 changed files with 20 additions and 2 deletions

View File

@ -33,7 +33,7 @@
# define extra packages here
mkExtraPkgs = system: {
# android-tools = inputs.pkg-android-tools.legacyPackages.${system}.android-tools;
inherit (inputs.pkg-android-tools.legacyPackages.${system}) android-tools;
inherit (inputs.pkg-android-tools.legacyPackages.${system}) android-tools android-udev-rules;
};
# Variables to be passed to NixOS modules in the vars attrset
@ -66,7 +66,7 @@
# This function produces a nixosSystem which imports configuration.nix and
# a Home Manager home.nix for the given user from ./hosts/${hostname}/
mkSystem = {system, hostname, username ? username}:
mkSystem = {system, hostname, username ? _username}:
lib.nixosSystem {
inherit system;
modules = [
@ -102,12 +102,17 @@
./system/plasma.nix
./system/fragments/opengl.nix
./system/gaming.nix
./system/android.nix
# ./system/hyprland.nix
(homeManagerInit {
module = import ./hosts/slab/home.nix;
inherit system;
})
];
specialArgs = {
inherit inputs outputs vars;
extraPkgs = mkExtraPkgs system;
};
};
nullbox = lib.nixosSystem rec {
system = "x86_64-linux";

View File

@ -1,10 +1,14 @@
{ config, lib, pkgs, extraPkgs, ... }:
# TODO extraPkgs isn't a normal argument, make this somehow accessible if
# imported into a different configuration; maybe a wrapper function in the flake
with lib;
{
meta.maintainers = [ maintainers.mic92 ];
disabledModules = [ "programs/adb.nix" ];
###### interface
options = {
programs.adb = {

9
system/android.nix Normal file
View File

@ -0,0 +1,9 @@
{ config, lib, pkgs, outputs, vars, ...}@args:
{
imports = [ outputs.nixosModules.adb ];
config = {
programs.adb.enable = true;
users.users.${vars.username}.extraGroups = [ "adbusers" ];
};
}