MidstallSoftware / mobile-nixos

https://mobile.nixos.org/
MIT License
4 stars 0 forks source link

A/B rootfs #4

Open RossComputerGuy opened 1 month ago

RossComputerGuy commented 1 month ago

Like Android, we should be able to use an A/B rootfs to fallback in case of a fatal failure. This might mean a separate partition will have to be added for data.

samueldr commented 1 month ago

Note that this is largely a NixOS problem outright, and maps badly to how NixOS operates. A correct A/B scheme makes the resulting system a non-NixOS. And without work within Nix itself, will not allow Nix to be usable on the final system.

RossComputerGuy commented 1 month ago

Wouldn't having duplicate nix store partitions work? Could overlay those to the "active" rootfs.

samueldr commented 1 month ago

There might be workarounds, but all I can think break the guarantees you want or need from A/B. Though I'm not saying this to stop you in your tracks. I'm hinting at some of the hard problems you'll be faced with.