Repository navigation
NixOS or Nix-on-Droid support #536
Replies: 3 comments
|
Great question — and rather than answer from theory, I just ran the whole thing on a real device inside Haven's local Linux environment. Here's where Nix and Haven stand, and a walk-through that's been tested end to end today (Debian 13 guest, Nix 2.26.3, arm64). Everything marked ✅ below is something I watched work; the one thing I haven't verified yet is marked honestly. The short version
Setting up Nix in Haven, step by step1. Install the Debian environment (skip if you already have one) Linux tab → environment picker → Debian 13 (Trixie). You get a root shell in the guest — no 2. Install Nix from Debian's own archive ✅ Heads-up on size and patience: Why Debian's package instead of the famous 3. One weird fix, before your first This is the step that makes or breaks it. Nix 2.26 unpacks downloaded sources into a small git repository at The fix is to create that repository yourself with ordinary git, which writes files in a way proot handles fine: (Order matters: if a broken cache already exists, While you're in config territory, also turn on flakes permanently and switch off the build sandbox — proot can't provide the kernel namespaces the sandbox needs: 4. The payoff ✅ First run is the slow one: it downloads the nixpkgs snapshot (~65 MB), unpacks it (a few hundred MB, several minutes under proot), evaluates, then pulls After that first run the nixpkgs snapshot is cached and things get much snappier. What to expect (honest edition)
Could Haven do this for you?Maybe, and this thread is a good place to gauge appetite. The realistic options, in increasing order of effort: a documented guide (this comment), a one-tap "Nix" setup that runs steps 2–3 automatically on a Debian environment, or teaching Haven's proot layer to not break the git cache in the first place (which would also help other libgit2-based tools). A full NixOS environment stays off the table until something fundamental changes in what unrooted Android allows. If you try this, I'd genuinely like to hear how far you get — including where it's slow or confusing. That feedback is what turns a workaround comment into a built-in feature. |
|
Update: step 3's The guide above told you to pre-create Nix's tarball cache with Both are fixed in v5.87.22: on a fresh install, and Everything else in the guide stands. F-Droid users: v5.87.22 reaches the F-Droid index on its usual few-day lag. |
|
Not yet. The package-family plumbing has a Nix slot but the install path isn't implemented, so there's no working guide to write today. Distribution requests are tracked in #162 — add your vote and any specifics there (Nix-on-Droid rootfs import vs a nixpkgs channel) and it feeds the priority order. |
Uh oh!
There was an error while loading. Please reload this page.
Can you either add a Local Linux Nix environment directly, or write a guide on how to set one up?
All reactions