So this issue is now opened for multiple months and is wreaking havoc on my deployments.
https://github.com/NixOS/nixpkgs/issues/72372
I have tried to have a go at it, but it seems i cannot find a nice way to do it. It seems like a circular dependency to me, and i do not know enough about the whole nixos-rebuild script.
Would it be possible to get some help from someone that knows it to explore the steps needed ?