What actually changes
- Packages come from nixpkgs — around 100,000 of them, prebuilt and downloaded from an official cache — instead of the hand-maintained repository at
repo.pathayam.xyz. - Your installed packages do not come across. You reinstall them by name, which is usually one command. Files you made are a plain copy.
- Your setup becomes a file. You list what you want and run one command to make the system match it, instead of remembering what you installed months ago.
- Programs run under proot. The code is native
aarch64and runs on the CPU directly, but long shell loops and big compiles pay a small overhead. Your Android files stay visible at/android.
Timeline
v0.2.35-a-vajrepo.pathayam.xyz, online read-only for at least 6 monthscom.termux.launcher.nix1. Back up your VAJ home
In the VAJ terminal:
termux-setup-storage
tar -czf ~/storage/shared/vaj-home.tar.gz -C /data/data/io.vaj.tl/files home
That writes one archive to your phone's shared storage, where the new app can read it. Keep it until you are sure the move is finished.
2. Install the Nix edition
On the releases page, pick a release whose tag ends in -nix and install its APK. Its Android package is com.termux.launcher.nix, so it installs next to VAJ rather than over it.
3. First launch
Open the app and let it download its bootstrap. Then it asks one question:
Do you want to set it up with flakes? (y/N)
Answer y. The build that follows takes a few minutes on a recent phone and up to about half an hour on an old one, and it prints nothing for long stretches — that is normal.
Keep the app in the foreground. Android cuts network to background apps, which stalls the download.
You end up at a plain bash-5.3$ prompt. That is expected — the real environment is the next step.
4. Set up the environment
setup-launcher
One command. It fetches the launcher's configuration, builds it, and switches to it. Another few minutes, foreground again.
If that says
command not found, your build predates it. These four lines do the same thing:cd ~/.config/nix-on-droid rm flake.nix nix-on-droid.nix nix flake init -t github:PickleHik3/nix-on-droid/launcher-nix#launcher nix-on-droid switch --flake ~/.config/nix-on-droid
When it finishes, open a new session — the shell only changes for sessions started after a switch. You now have fish, the themed prompt, eza, zoxide, yazi, Neovim, and fastfetch.
Two optional follow-ups it will mention: setup-toolkits chooses what is installed (Node, Go and Python are off by default), and setup-nvim sets up Neovim.
5. Bring your files across
In the Nix terminal, unpack the archive into a folder of its own:
termux-setup-storage
mkdir -p ~/vaj-home
tar -xzf ~/storage/shared/vaj-home.tar.gz -C ~/vaj-home --strip-components=1
If tar is not found — you turned the build toolkit off in setup-toolkits — nix shell nixpkgs#gnutar gives it to you for that session.
Then copy out what you want, for example:
cp -r ~/vaj-home/projects ~/
cp -r ~/vaj-home/.ssh ~/ && chmod 700 ~/.ssh
Do not unpack it over your home directory. The Nix setup owns some dotfiles —
~/.config/fish/config.fishamong them — as read-only links. An ordinary file in their place makes the next update fail. Copy the files you want instead, and leave the rest in~/vaj-home.
Do not copy VAJ's usr directory either. Those programs were built for Termux and cannot run here.
6. Get your packages back
Three ways, in the order you will want them:
setup-toolkits # groups: editor, build tools, node, go, python
nix search nixpkgs ripgrep # find one thing
nix profile install nixpkgs#ripgrep # install it now
For anything you would be annoyed to lose, add it to the extraPackages list near the top of ~/.config/nix-on-droid/home.nix and apply it:
nix-on-droid switch --flake ~/.config/nix-on-droid
Names are usually what you expect; when they are not, search search.nixos.org. A name that does not exist fails the update by name and leaves your working environment alone.
7. Remove VAJ when you are ready
Use the new app for a few days first. When you are happy with it, uninstall Termux Launcher (VAJ) from Android's app settings, and keep vaj-home.tar.gz a while longer.
If something goes wrong
- A failed update changes nothing — the environment you are in keeps working, and the error names the file it tripped on.
nix-on-droid rollbackreturns to the previous working environment.- The full beginner's guide is Nix edition: a beginner's guide.