Help Wanted: Updating Nix as part of nixos-rebuild --switch

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 ?

2 Likes

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