long, mobile/ARM NixOS
@ebi Heh, that's a tricky one!
So I would say that there's not really any *fundamental* difference between ARM/mobile and other systems, in that all the same benefits are still useful on those devices for all the same reasons.
What *is* different, however, is the typical hardware configuration of such devices - and I can see some issues there with the current state of Nix and NixOS.
Some things that come to mind:
- Nix is currently not exactly resource-efficient. It requires quite a bit of CPU and RAM to evaluate a system configuration, which is not great on many mobile devices, which are often specced lower.
- The atomic upgrade model is great, but also very space-hungry. Again, mobile devices are frequently not very generous on storage space, and this could cause issues, at least without a deduplicating filesystem.
- Nix is still heavily keyboard-oriented, and well, most such devices don't have a keyboard :) So it's probably *even more* important for there to be good management UIs on such devices. Less of a problem for embedded ARM stuff like routers.
I don't think that any of these issues are impossible to overcome, but there's definitely quite a bit of 'core work' left to make this viable outside of an experimental context.
That having been said, there *is* https://mobile.nixos.org/ as an ongoing project. I've also seen various efforts for running NixOS on eg. ARM routers, but I'm not sure what the status of any of them is.
Perhaps more interesting in the immediate term is using Nix as a build system for eg. Android images; and there's actually active work ongoing here! Robotnix can build customized AOSP systems, for example: https://github.com/danielfullmer/robotnix
Maybe other "off-device" approaches might be viable as well - if it doesn't need to run on the device itself, that'll at least eliminate the CPU/RAM constraints.
In summary: I think it would be really cool to run NixOS on mobile/ARM devices, but I think that in practical terms we're still quite a way away from it - further than for desktop/server usage.
long, mobile/ARM NixOS
@joepie91 @ebi answering as the usual suspect for Mobile and ARM things and NixOS.
One thing I’d say is that it’s a big “it depends”. Mobile/ARM is loaded terminology.
ARM is just another ISA (instruction set). On an equivalent well-supported as-powerful system, it works just like x86_64 does. The answer her would be generally true for e.g. big server hardware. It’s generally well-supported by mainline, and just works using standards-based boot. Since it’s powerful, and has RAM and storage, it works just the same.
Conversely, SBC-class “underpowered” SoCs, with not much RAM, and not much storage is just as painful as it is for x86_64. Take one of those Cherry Trail SBCs and you’ll have just as much pain as the equivalent power ARM system. The main difference will be the ease of booting since the Cherry Trail SBC will likely use standards-based boot (EFI). With some ARM SBCs you can have boot that is just as painless.
So, if you want to know about on a tablet or phone, since you said mobile, this is yet another class of “it depends”. Namely, it depends on how upstream projects support it, mostly.
While there is some bespoke development for NixOS-specific details, mainly around handling generations, Mobile NixOS tries to be just NixOS. So you have to find information about what upstream projects you’re interested in running on your system.
I personally maintain and support Plasma Mobile for NixOS, and thus Mobile NixOS. Running on a Lenovo Duet (krane) (MT8183), everything with mainline Linux (+1 regression patch) and just NixOS + Mobile NixOS (for its handling of the non-standard boot).
Similarly, a device I’m not daily driving, but want to soon enough, the Oneplus 6 (and 6T would be equivalent) is well-supported by upstream projects. The state here is just like it is for those upstream projects.
So, my take is: For NixOS on ARM, ignoring mobile, it works just as well as the upstream support does for standards-based boot systems, including SBCs when paired with something like Tow-Boot. For non-standards-based or non-mainline SBC YMMV, but reproducibility helps immensely in documenting and understanding the problematic bits.
And for Mobile, it will be YMMV as a cross of what Mobile NixOS has abstracted already, how the platform boots, and what state upstream projects are in.
If you have more precise questions, don’t hesitate to ask! There is a lot of YMMV, but also a lot of just works, depending.
long, mobile/ARM NixOS
@joepie91 @ebi I can’t believe I forgot to shill that post detailing my view of the way forward
https://discourse.nixos.org/t/planning-for-a-better-nixos-on-arm/15346
re: long, mobile/ARM NixOS
@ebi Whoops, that one was supposed to be attached to this toot: https://khiar.net/@ebi/109496437685841174