host/home: update android env

This commit is contained in:
Dmitriy Pleshevskiy 2025-02-28 11:05:28 +03:00
parent c056af8b75
commit 3745999877
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
2 changed files with 24 additions and 18 deletions
hosts/home/configs
users/jan

View file

@ -2,20 +2,23 @@
let let
buildToolsVersion = "33.0.2";
androidComposition = pkgs.unstable.androidenv.composeAndroidPackages { androidComposition = pkgs.unstable.androidenv.composeAndroidPackages {
platformToolsVersion = "34.0.5"; platformToolsVersion = "35.0.2";
buildToolsVersions = [ buildToolsVersion ]; buildToolsVersions = [
includeEmulator = false; "33.0.2"
emulatorVersion = "34.1.9"; "34.0.0"
platformVersions = [ "29" "30" "33" ]; "35.0.1"
];
includeEmulator = true;
emulatorVersion = "35.3.10";
platformVersions = [ "29" "33" "34" ];
includeSources = false; includeSources = false;
includeSystemImages = false; includeSystemImages = true;
systemImageTypes = [ "google_apis_playstore" ]; systemImageTypes = [ "google_apis_playstore" ];
abiVersions = [ "armeabi-v7a" "arm64-v8a" ]; abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
cmakeVersions = [ "3.10.2" ]; cmakeVersions = [ "3.10.2" ];
includeNDK = true; includeNDK = true;
ndkVersions = [ "23.2.8568313" ]; ndkVersions = [ "27.0.12077973" ];
useGoogleAPIs = false; useGoogleAPIs = false;
useGoogleTVAddOns = false; useGoogleTVAddOns = false;
includeExtras = [ includeExtras = [
@ -36,6 +39,11 @@ in
nixpkgs.config.android_sdk.accept_license = true; nixpkgs.config.android_sdk.accept_license = true;
environment.systemPackages = [
pkgs.unstable.androidenv.androidPkgs.platform-tools
(pkgs.unstable.android-studio.withSdk androidComposition.androidsdk)
];
environment.variables = rec { environment.variables = rec {
ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk"; ANDROID_SDK_ROOT = "${androidComposition.androidsdk}/libexec/android-sdk";
ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle"; ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
@ -45,6 +53,7 @@ in
# JAVA_HOME = pkgs.jdk17.home; # JAVA_HOME = pkgs.jdk17.home;
}; };
services.udev.extraRules = '' services.udev.extraRules = ''
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev" SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
''; '';

View file

@ -15,16 +15,13 @@
age.secrets.users-jan-passfile.file = ./users-jan-passfile.age; age.secrets.users-jan-passfile.file = ./users-jan-passfile.age;
users.users.jan = { users.users.jan = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ extraGroups = [ "wheel" ] # Enable sudo for the user.
"wheel" # Enable sudo for the user. ++ lib.optional config.networking.networkmanager.enable "networkmanager"
(lib.mkIf config.networking.networkmanager.enable "networkmanager") ++ lib.optional config.virtualisation.docker.enable "docker"
(lib.mkIf config.virtualisation.docker.enable "docker") ++ lib.optional config.services.transmission.enable "transmission"
(lib.mkIf config.services.transmission.enable "transmission") ++ lib.optional config.services.kubo.enable config.services.kubo.group
(lib.mkIf config.services.kubo.enable config.services.kubo.group) ++ lib.optionals config.programs.adb.enable ["adbusers" "plugdev" "kvm"]
(lib.mkIf config.programs.adb.enable "adbusers") ++ lib.optional config.hardware.pulseaudio.systemWide "pulse-access";
(lib.mkIf config.programs.adb.enable "plugdev")
(lib.mkIf config.hardware.pulseaudio.systemWide "pulse-access")
];
shell = pkgs.zsh; shell = pkgs.zsh;
hashedPasswordFile = config.age.secrets.users-jan-passfile.path; hashedPasswordFile = config.age.secrets.users-jan-passfile.path;