Introduction
Android Nix provides a declarative way to configure your Android devices.
Instead of building custom scripts and finding the right ADB commands and settings, you just need to declare what is the base state you want for your device. If in the future the ADB API changes or you want to switch to a different phone, you don’t need to worry about updating your scripts. Android Nix takes care of it for you.
This means less mental overhead for you, while still being able to do most things you could already do. Besides, Android Nix provides a few additional upsides:
-
Simple rollback: You decide when to update your apps, if something breaks a simple
git resetwill do the trick. 1 2 -
Progressive updates: If an update breaks something, you can use Nix features to pin that app while still being able to update all others. 2
-
Trackable changes: Everything from the app versions you’re using to the specific device settings you want to update is fully Git trackable out-of-the-box.
-
Reproducibility: The apps you expect are exactly those you will get. Even when remotely fetching APKs, if their hash doesn’t match, it will fail.
Besides, Android Nix does not lock you into its ecosystem. The source
repositories for the APKs are transparent, thus allowing you to update them
outside of Android Nix. Fully leaving the Android Nix ecosystem is as simple as
running the eject command.
Android Nix natively supports F-Droid and IzzyOnDroid, but you can also use local and remote APKs.
If you are already familiar with Nix, you may be already thinking on the possibilities that this opens. Even if you are not familiar with it, feel free to jump into the Getting Started guide!
-
Just like in desktop applications, performing a rollback may result in unintended consequences if e.g., internal data migrations have been performed. If you ever need to rollback, make sure to read the project’s CHANGELOG and/or ask their community. ↩
-
Apps may update independently from their declaration in your
phone.nix. If an app integrates self-updates, you have an F-Droid client installed, or you download a newer APK signed with the same keys, the app may be updated unintentionally. ↩ ↩2