So this issue is now opened for multiple months and is wreaking havoc on my deployments.
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 ?
An idea would be to set
restartIfChanged to false in the systemd service nix and then add a check just for whether nix changed somewhere at the beginning of nixpkgs/switch-to-configuration.pl at 78956495de9930857962467b50de066e98eeb10b · NixOS/nixpkgs · GitHub and restart it before anything else
But I’m really just guessing