6 ms·
Nix-on-droid: Nix-enabled environment for your Android device (termux-based)
- throwaway70701 3y agoIt's not based on Termux. It shares the frontend terminal app code only.
- galacticaactual 3y agoWhy…
- otabdeveloper4 3y agoFor a serious answer: nix-on-droid has roughly a thousand times(*) more packages available than termux. (*) Not a scientific estimate.
- woile 3y agoThis is amazing, I've been playing a lot with nix and raspberries. But because they are expensive, just yesterday, I was wondering if I could use my old moto G as another board with nix. This is a step in that direction.
- AvImd 3y agoIt seems F-droid version tries to download bootstrap-arm.zip from a folder which only contains bootstrap-aarch64.zip (https://nix-on-droid.unboiled.info/bootstrap-release-22.11 https://nix-on-droid.unboiled.info/bootstrap-release-22.11)
- pulpfictional 3y agoF-droid should be avoided when you can get an apk release directly from the developer or the Google Play Store. Obtanium is great for managing this. https://github.com/ImranR98/Obtainium https://github.com/ImranR98/Obtainium https://privsec.dev/posts/android/f-droid-security-issues/ https://privsec.dev/posts/android/f-droid-security-issues/
- slim 3y agonot sure why you are saying this. if it's about security, it depends on your threat model
- pulpfictional 3y agoYour "threat model" requiring the option shown to be least safe doesn't make its vulnerabilities less so. To develop a "threat model" one must first ascertain the system's intrinsic risk before leveraging one's specific needs. If the outcome is the least secure option, then only your risk increases, the security of each option remains unchanged.
- slim 3y agoI don't think there is an "intrinsic risk" in anything. I personally trust F-Droid more than Obtainium and even more than most original developers themselves, because 1) F-droid has been around for a long time and it's proven to be well governed. 2) F-droid tells me if the software is still maintained, if it's a fork of another project, if the opensource software is using non open service as a backend, etc..
- unstuck3958 3y agoSeeing so many submissions related to Linux on Android makes me surprised that it wasn't common knowledge on HN. Another such gem: userland.tech (let's you run full distros or apps on linux, including Debain and Arch). I use it to run LibreOffice on my Android Tablet.
- heavyset_go 3y agoI tried searching the UserLand repo for how they implemented this, are they running native Linux apps in a GNU userland, possibly with namespaces/chroot, without virtualization? Does it do what Termux does and recompile binaries against the NDK? I've watched projects like this come and go for like 12 years now, and I've always thought that it's an interesting problem with interesting solutions.
- Rufbdbskrufb473 3y agoI could be wrong, but I believe they were using a modified chroot with some preload libraries to intercept missing kernel calls.
- kortriephfhe 3y agoIIRC it was `proot`, it's not a preload, but ptrace based. preload based unprivileged chroot exists (libfakechroot), but doesn't work for static linked binaries.
- kortriephfhe 3y agoIIRC they do complete proot-based distro instead of ndk-recompiles. There's a termux equivalent package called proot-distro you can install, if you're fine with CLI.
- ChuckNorris89 3y ago>Seeing so many submissions related to Linux on Android makes me surprised that it wasn't common knowledge on HN. HN seems to be mostly Apple & iOS users which are probably not very up to date on what's going on in the Android ecosystem, so HN is a good agregator to learn about these things.
- ryangibb 3y agoFor full NixOS on an android device, something more like postmarketOS, see also https://mobile.nixos.org https://mobile.nixos.org.
- tsvallender 3y agoDo you know what the status of this is? I've been interested previously but notice the site hasn't been updated since 2021
- Jhsto 3y agoGithub has more recent activity: https://github.com/NixOS/mobile-nixos https://github.com/NixOS/mobile-nixos
- skhm 3y agoi bought a shitty android phone with a physical blackberry like keyboard exclusively to use this and it is admittedly very sweet, but i can’t mainline android and ios at the same time so it mostly sits in the cupboard :( but every time (every few months) a quick git pull and nixos rebuild gets me back my desktop setup. it’s quite a marvel, way beyond termux. performance is good even on poorish hardware.
- pluijzer 3y agoCould you tell me which phone this is? I am very curious to try it out myself. Thanks
- skhm 3y agothe unihertz titan pocket. I can’t recommend it in good faith, it mostly gathers dust. I was trying to be a bit more considered about my phone use and thought a downgrade daily carry would help but it pissed me off and now I use my iPhone even more than before. A very “me” problem though, you might love it!
- pluijzer 3y agoThank you, If I see one cheap somewhere might get it anyway and have some fun with it for a weekend.
- skhm 3y agotbf I can't imagine a phone with as much functionality being as cheap as the base price - even in the UK, 250 GBP ish for a semi-decent android with a physical keeb is weirdly low for the nice in which it lives. i'm sure ebay has cheaper but i daren't look. in fact you could have mine for 100 GBP - I've realised how little I use it - harry @ skh . am if you are interested.
- hyperthesis 3y agoHow does this compare with termux? What are the advantages? (termux is still available on fdroid https://f-droid.org/en/packages/com.termux/ https://f-droid.org/en/packages/com.termux/) I am guessing it is avoiding all the android-lockdown problems besetting termux... though termux still works for me on android 11... It uses proot - doesn't that come with a substantial performance hit?
- MacsHeadroom 3y agoIt's a fork of Termux with all the same restrictions as far as I can tell. The difference is that it uses Nix OS instead of the Termux repos, which has more software available.
- hyperthesis 3y agoOK, so it's a normal unix release, and uses proot for a virtual directory structure. It says it only uses the terminal emulator from termux. termux doesn't use proot - its distribution has all paths rewritten (usually in source) to cope with the android filesystem (and other changes). I'm always surprised that this hackery works so well! Therefore, I'd expect identical programs to be slower in nix-on-droid.
- MacsHeadroom 3y ago>I'd expect identical programs to be slower in nix-on-droid. Probably. But modern phones are well beyond the power needed to run linux programs at useful speeds. Termux first came out over a decade ago, IIRC. Back then phones were much less powerful.
- hyperthesis 3y agoVery true, though for compilation, perceptively-instant is nice rather than a few seconds.
- netfortius 3y agoWhat is it that differentiates the content of nixpkgs from the Termux available packages?
- lillecarl 3y agohttps://repology.org/repositories/graphs https://repology.org/repositories/graphs Size and freshness.
- kortriephfhe 3y agoThere's proot-distro, which does the same thing but with conventional linux distributions like Debian and Arch. https://github.com/termux/proot-distro https://github.com/termux/proot-distro