nix-community / nix-on-droid

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

Magisk-based implementation, instead of proot? #252

Open bqv opened 1 year ago

bqv commented 1 year ago

Spitballing here, on rooted devices where it seems like gentoo prefix has died, nix seems like a nice alternative. I'm somewhat sure, with magisk, a real /nix could be bind-mounted from e.g. /data/nix, and a nix-daemon run in a privileged scope so that any terminal app can then access the store, and any user can run apps

Thoughts?

t184256 commented 1 year ago

If you have root, you can also do user mount namespaces. Outer login script will have to be modified to use them instead of proot. Pull requests are welcome.

bqv commented 1 year ago

user mount namespaces wont work without somewhere to mount to, unless i'm wrong?

anyway, the loss with that avenue is nix-daemon isn't running (in a privileged scope)