Foreword:
My NixOS experience is actually limited to this device. So this might not be this optimal and there are some parts of this that look a bit cringe to me and they might not be necessary but I left them here for now...
By the way: If you got a Pocophone F1 with EBBG display you will likely have to figure out a bit of stuff and then contribute to the Mobile NixOS repo. Most beryllium owners have a Tianma display.
Start on a aarch64 machine (e.g. SBC RPi 4):
Then e.g. this for phosh (hello actually has a few words on that iirc):
nix-build examples/phosh --argstr device xiaomi-beryllium -A outputs.default
fastboot flash boot result/boot.img