Reading Installing from another Linux distribution (from nixos manual) step 9 says:
The lustrate process will not work if the
boot.initrd.systemd.enableoption is set totrue, which is now the default. Setting this tofalseis deprecated and scheduled for removal in NixOS 26.11, along withNIXOS_LUSTRATE. Other installation methods, such as the one outlined above, or installing from kexec, are recommended instead.
Following to the kexec link only explains setting up and starting the kexec, not what should come after.
As opposed to the lustrate tutorial which is very step-by-step and ends with a complete NixOS system.
Given kexec puts you into a linux system which is on a seperate partition (since it is in ram), I’m assuming the logical next steps is to follow a different branch from the same section:
Start of the section:
You can […] Install NixOS on another partition, from your existing Linux distribution (without the use of a USB or optical device!)
Step 4:
The following 5 steps are only for installing NixOS to another partition.
But this guide expects the current system is not on NixOS (which the kexec is), and so steps 1-3 are not necessary.
Overall it’s very confusing to follow, which is especially a problem in this case since we’re dealing with formatting drives and the likes, which can make a system unrecoverable.
And so small uncertainties quickly become huge doubts !
As for the solution, I think there should be a step-by-step guide in the same style as for NIXOS_LUSTRATE for the kexec way, from starting on a distro without nix, all the way to having in-place replaced the OS with NixOS
(and probably have small notes on how to keep ssh connectivity throughout, since usually if you can’t use a boot media, it’s because you’re connecting remotely)
I’m open to contributing this guide myself, but do not yet have a full understanding of everything involved (myself trying to follow this guide), and as such would need guidance to do so.