Are you aware of this project: https://github.com/NixOS/mobile-nixos ?
nixos
All about NixOS - https://nixos.org/
Nope! But I am now!:D
I know nothing about this project, but some effort has seemingly been put into this idea already :)
Personally, the more devices I can use NixOS on, the happier I am.
I recently installed nixos on my pinephone. Still not my daily driver though. Pinephone is kind of underpowered, short battery life, potato quality camera. But it's a fine phone shaped computer.
i use NixOS on my Pinephone daily, more as a PDA. it’s my primary device for music, audiobooks, podcasts, ebooks, RSS feeds and manga reading. i’m 50/50 for using it vs my iphone when it comes to IM (mostly Matrix), Lemmy, and maps.
there’s decently mature software for all of those applications (with a big asterisk for maps); i’m surprised that bluetooth is actually super usable (with Megi’s kernel, at least). but anything touching the modem is where the dragons lie. i’m trying to get GPS working, but having to actually read the Qualcomm manuals to get the details right. ModemManager is smart enough to initialize most of the modem — so that you can use the earpiece from any userspace application — but even if you plan to use it without a cell plan you still need a SIM card for it to not fail during initialization… it doesn’t have to be activated, but still a bizarre quirk.
anyways, NixOS will get you a working PDA if you’re a fluent user. to use it as a proper cellphone, that’s within sight if you’re dedicated but not something that you should expect to get working “in an afternoon”. btw postmarketOS is fantastic to use as a reference for how to wire all the parts together. the Nix User Repository has a few actively-deployed mobile configurations in there if you grep through it too.
I use Nix (not yet NixOS) on a Librem 5. Debian stable is so old, so it's nice to have Nix as an alternative.