nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.33k stars 74 forks source link

Support for termux addons and general questions about the intended scope of the project? #56

Open operator-name opened 4 years ago

operator-name commented 4 years ago

I want to begin by saying thanks for the project! I'm a big nixos fan and having it's features be available on android is quite nice. If you're curious I found the project after seeing your nixcon talk.

I'm wondering if it's inside the scope of the project to support some of the addons? More specifically termux-boot and termuxlauncher (which unfortunately has no licence so may have to be a clean room implementation (which may or may not take further inspiration from TUI) unless the creator sets a real licence.)

If you were willing to setup an organisation I'd be happy to put in some effort figuring it out myself. I'd also be interested in having a nix config for android, with the end goal of being able to carry around most of the state of an android system without root and playing by android's rules.

t184256 commented 4 years ago

The Java part is an outdated fork of Termux with very minimal changes, some of the add-ons baked in (at least styling), and a rename done through some really fragile suffixing thing. I have very little knowledge about Android development and I don't really plan to acquire any, so... Send in PRs, I'll test them.

For running cmds under Nix-on-Droid from other apps, I can tell you I'm successfully doing it from Easer (starting an evdev-uinput keyboard remapper as root when it gets connected). There's very little magic in it, so, maybe some other apps capable of running custom commands as root would suit your use case?

For the launcher one, I've seen from the description that it can work with unmodified termux. Maybe just replacing "com.termux" with "com.termux.nix" would be sufficient?

operator-name commented 4 years ago

I have to admit my android development is also limited. It's been a while since I evaluated rooting and unfortunately my current phone is unrooted.

After having some discussion about nix on mobile in general I think what I'd most like to work on would be an interface between nix and android settings. Since you're happy with PRs, moving forwards I will first attempt to merge the new changes to termux onto your branch.

Let me know how you'd feel about unmerging the styling and such changes and maintaining separate addon apps. Taking inspiration from termuxlauncher I think a possible cleanish way to interface with addon-apks that provide extra functionality would be to create a nix script that can be referenced that throws some intents around, which upon being received by the app does the writes. Obviously as shown by your merge this could be included in the base app but I don't know if it's something you'd be happy to merge.

t184256 commented 4 years ago

Let me know how you'd feel about unmerging the styling and such changes and maintaining separate addon apps.

Mostly positively. I like styling being baked in, but I don't think it's a big hassle to install it separately. I'm fine with breaking addons for existing users if it's documented somewhere, and adding supporting more of them also sounds cool. The reason why I went with integrating is that I couldn't figure out all those intents things. And the reduced maintenance burden is definitely a big plus, otherwise I'll probably never get to catching up with Termux.

t184256 commented 4 years ago

For the unmerging part it probably makes sense to cherry-pick my pretty limited changes on top of current termux and start fixing intents / addons.

bbigras commented 3 years ago

termux-api could be nice to use with node-red (with https://flows.nodered.org/node/node-red-contrib-termux-api)

bbigras commented 2 months ago

Is styling still baked in? I would like to use it with https://github.com/catppuccin/termux but I got the popup telling me to install the plugin.

t184256 commented 2 months ago

On August 27, 2024 3:33:28 AM GMT+02:00, Bruno Bigras @.***> wrote:

Is styling still baked in? I would like to use it with https://github.com/catppuccin/termux but I got the popup telling me to install the plugin.

Yes, just pick one of

https://github.com/catppuccin/termux/tree/main/themes

and use the values through

https://nix-community.github.io/nix-on-droid/nix-on-droid-options.html#opt-terminal.colors