NixOS on Edge2 (works with UEFI)

Just wanna make a topic about how to run edge2 on NixOS.

I tried some times and what I discovered.

NixOS SD build doesn’t have display output, but freezes on

I/TC: Secondary CPU 7 switching to normal world boot

If you install UEFI and try to boot normal Arm64 you will still not get display output, but can successfully boot and get access to shell, but only in serial debug with edge2 IO module

It’s probably because of the kernel and the device tree (DTS).
Everyone is hoping that the mainline kernel will eventually put an end to the constant need for tweaks, but to be honest, I fear there will always be a disconnect between what’s in the mainline and what Linux actually uses across different distros.
It seems like there’s always a need to patch the kernel, adjust DTS/DTBs, and mess with overlays just to get peripherals working.