Skip to content

Android Server | Nix Flakes

🤯 Is that even a thing? I want it, give it to me now!

fry money gif

Android Server

Why? Why would you even? 😑

Ummm because it's fun lol

You can check out my post here where I setup a basic Android server that is truly headless 😂 stacked in the rack with ethernet and power.

Nix On Android

Nix-On-Droid is the Nix package manager on Android that has flake support baked in 🤤

I think you can all see where this is going? I have two racked, remotely accessible Google Pixel 5 phones with stable networking... ⚙️turn-turn ⚙️turn-turn 💡 We should deploy Nginx load balanced across the devices for funzies❗️

Nginx

I failed to get Nginx working with nix-on-droid. Qemu seems to work with nix-on-droid aarch64-linux emulation which is the Pixels native architecture. Maybe I can emulate a full NixOS system that has services. capability to get Nginx running. I could use NixOS ARM image so no extra compile work would be needed, serve the image over pxe boot just to be cool 😎

nginx -c ./nginx.conf -g "http { server { listen 8000; root ./index.html; } }"

Node JS

Decided to server static .html content with node. I need to figure out how to create a load balancer with no working systemd or init runtimes...🤔 There has to be a JS package, hopefully.

Goal

Android Server: - [x] git pull my main Nix repo and deploy Android headless servers - [ ] Host the same website on both servers and load balance it - [ ] HTTPS signed by a trusted CA - You can use an external reverse proxy for simplicity - [ ] Can you reach it publicly?