From 2e9eda64d4ee4fc9b76ab962de6ef7bb87a7d77d Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 11 Aug 2025 22:29:50 -0700 Subject: [PATCH] add expo dev deps --- flake.lock | 110 +++++++++++++++++++++++++++++----- flake.nix | 9 +++ lib/mkSystem.nix | 1 + modules/home/default.nix | 32 ++++++++++ modules/shared/nix.nix | 1 + users/natalie/home.nix | 3 + users/natalie/laptop/home.nix | 3 + users/natalie/packages.nix | 1 - 8 files changed, 143 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 6695b0d..732953d 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,28 @@ { "nodes": { + "android-nixpkgs": { + "inputs": { + "devshell": "devshell", + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1754511800, + "narHash": "sha256-/gYkj4dbzcAV1EWJYy+2ryHGtC57jhIrRwSGQKCT8Gk=", + "owner": "tadfisher", + "repo": "android-nixpkgs", + "rev": "5bb0f6e7b112c7be7895c6058925c29db360b205", + "type": "github" + }, + "original": { + "owner": "tadfisher", + "ref": "stable", + "repo": "android-nixpkgs", + "type": "github" + } + }, "apple-fonts": { "inputs": { "nixpkgs": [ @@ -49,6 +72,27 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "android-nixpkgs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1741473158, + "narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=", + "owner": "numtide", + "repo": "devshell", + "rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -106,6 +150,24 @@ "inputs": { "systems": "systems" }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, "locked": { "lastModified": 1701680307, "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", @@ -120,9 +182,9 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1731533236, @@ -138,7 +200,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_4": { "inputs": { "systems": [ "nvf", @@ -159,9 +221,9 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_5": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1705309234, @@ -177,9 +239,9 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1710146030, @@ -195,9 +257,9 @@ "type": "github" } }, - "flake-utils_6": { + "flake-utils_7": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1705309234, @@ -300,7 +362,7 @@ }, "moonlight": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -341,7 +403,7 @@ }, "nix-options-search": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "gitignore": "gitignore", "nixpkgs": "nixpkgs" }, @@ -425,12 +487,12 @@ "nvf": { "inputs": { "flake-parts": "flake-parts", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "mnw": "mnw", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1754043154, @@ -461,6 +523,7 @@ }, "root": { "inputs": { + "android-nixpkgs": "android-nixpkgs", "apple-fonts": "apple-fonts", "darwin": "darwin", "home-manager": "home-manager", @@ -669,6 +732,21 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "zen-browser": { "inputs": { "nixpkgs": [ @@ -692,7 +770,7 @@ "zig": { "inputs": { "flake-compat": "flake-compat", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -712,7 +790,7 @@ "zig-overlay": { "inputs": { "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_7", "nixpkgs": [ "zls", "nixpkgs" @@ -734,7 +812,7 @@ }, "zls": { "inputs": { - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "gitignore": "gitignore_2", "langref": "langref", "nixpkgs": "nixpkgs_4", diff --git a/flake.nix b/flake.nix index 6c4b436..cfd82ab 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + android-nixpkgs = { + url = "github:tadfisher/android-nixpkgs/stable"; + inputs.nixpkgs.follows = "nixpkgs"; + + }; + nix-options-search.url = "github:madsbv/nix-options-search"; nix-index-database.url = "github:nix-community/nix-index-database"; @@ -47,6 +53,7 @@ overlays = [ inputs.zig.overlays.default inputs.rust-overlay.overlays.default + inputs.android-nixpkgs.overlays.default # https://github.com/LnL7/nix-darwin/issues/1041 (_: prev: { @@ -128,6 +135,8 @@ user = "natalie"; host = "laptop"; system = "aarch64-darwin"; + extraModules = [ + ]; }; # chloe's mac studio "sandwich" diff --git a/lib/mkSystem.nix b/lib/mkSystem.nix index b7ad5bb..e393869 100644 --- a/lib/mkSystem.nix +++ b/lib/mkSystem.nix @@ -75,6 +75,7 @@ let ]; } inputs.nvf.homeManagerModules.default + inputs.android-nixpkgs.hmModule ]; in systemFunc { diff --git a/modules/home/default.nix b/modules/home/default.nix index c7102e2..fa464a3 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -22,8 +22,40 @@ in default = { }; description = "set the ghostty shader, relative to 'files/ghostty'"; }; + programs.android-sdk.enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = "enable android sdk stuff"; + }; }; config = { + android-sdk = { + enable = config.programs.android-sdk.enable; + packages = + sdk: + with sdk; + [ + build-tools-35-0-0 + cmdline-tools-latest + emulator + platform-tools + platforms-android-35 + sources-android-35 + ndk-27-1-12297006 + cmake-3-22-1 + ] + ++ lib.optionals host.darwin [ + system-images-android-35-google-apis-arm64-v8a + system-images-android-35-google-apis-playstore-arm64-v8a + ] + ++ lib.optionals host.linux [ + system-images-android-35-google-apis-arm64-v8a + system-images-android-3-google-apis-playstore-arm64-v8a + ]; + }; + xdg = { + enable = true; + }; home.shell = { enableShellIntegration = true; }; diff --git a/modules/shared/nix.nix b/modules/shared/nix.nix index 1300a0f..7997bf0 100644 --- a/modules/shared/nix.nix +++ b/modules/shared/nix.nix @@ -2,6 +2,7 @@ { nixpkgs.config = { allowUnfree = true; + android_sdk.accept_license = true; }; nix = { diff --git a/users/natalie/home.nix b/users/natalie/home.nix index 9dfdb5c..eba3253 100644 --- a/users/natalie/home.nix +++ b/users/natalie/home.nix @@ -1,9 +1,11 @@ { pkgs, lib, + options, ... }@args: { + programs = { # sort-lines:start atuin.enable = true; @@ -13,6 +15,7 @@ fish.enable = true; man.generateCaches = false; lsd.enable = true; + android-sdk.enable = true; # sort-lines:end }; diff --git a/users/natalie/laptop/home.nix b/users/natalie/laptop/home.nix index 698a10d..6974967 100644 --- a/users/natalie/laptop/home.nix +++ b/users/natalie/laptop/home.nix @@ -16,6 +16,9 @@ "$HOME/.emacs.d/bin" ]; + sessionVariables = { + }; + packages = with pkgs; [ #PDF viewer for VimTeX skimpdf diff --git a/users/natalie/packages.nix b/users/natalie/packages.nix index 51a42f4..d10b03e 100644 --- a/users/natalie/packages.nix +++ b/users/natalie/packages.nix @@ -95,7 +95,6 @@ with pkgs; #expo deps watchman zulu17 - android-tools #browsers tor