expo template

This commit is contained in:
2026-06-02 12:01:39 +02:00
parent 7923514c5c
commit cc596e632f
40 changed files with 407 additions and 17 deletions

View File

@@ -1,4 +1,10 @@
{ pkgs, lib, config, inputs, ... }:
<@if(neq(context.project.frontend,"none"))>
bundev = {
exec = "bun dev";
cwd = "./apps/web";
after= ["devenv:processes:air@started"];
};
<@endif>{ pkgs, lib, config, inputs, ... }:
{
packages = [
@@ -13,8 +19,27 @@
pkgs.protoc-gen-connect-go
pkgs.protoc-gen-es
pkgs.cobra-cli
<@if(eq(context.project.mobile,"expo"))>
pkgs.glib
<@endif>
];
<@if(eq(context.project.mobile,"expo"))>
android = {
enable = true;
emulator = {
enable = true;
};
buildTools.version = ["34.0.0" "35.0.0" "36.0.0" ]; # add 36.0.0
reactNative.enable = true;
android-studio = {
enable = false;
};
ndk = {
enable = true;
version = [ "27.1.12297006" ];
};
};
<@endif>
languages.go.enable = true;
languages.typescript.enable = true;
services.postgres = {
@@ -28,6 +53,21 @@
}
];
};
<@if(eq(context.project.mobile,"expo"))>
enterShell = ''
export LD_LIBRARY_PATH=$ANDROID_HOME/emulator/lib64:$LD_LIBRARY_PATH
'';
tasks.'<@var(context.project.name)>:create-avd'.exec = ''
avdmanager create avd
-n "Pixel_5_API34"
-k "system-images;android-34;google_apis_playstore;x86_64"
-d "pixel_5"
'';
tasks.'<@var(context.project.name)>:run-emulator' = {
exec = "emulator -avd Pixel_5_API34";
after = [ "<@var(context.project.name)>:create-avd" ]
};
<@endif>
processes = {
air = {
exec = "air";
@@ -49,12 +89,11 @@
cwd = "./services/api";
after= ["devenv:processes:air@started"];
};
<@if(neq(context.project.frontend,"none"))>
bundev = {
exec = "bun dev";
cwd = "./apps/web";
after= ["devenv:processes:air@started"];
};
<@if(eq(context.project.mobile,"expo"))>
emulator = {
exec
}
<@endif>
};
}