Http Error 200 on nixos-rebuild


I am getting an http Error 200 when trying to rebuild my system. It says it times out and will do it for multiple packages.

I’ve tried looking through old topics on the issue and have tried the following:

-Adding “stalled-download-timeout = 1000” to ~/.config/nix/nix.conf (though I’m not sure if I need to do something special for this nix.conf file to be read)

-Disabling Ipv6

It is the same error from the following Nixos-rebuild switch fails every time with "HTTP error 200 (curl error: Timeout was reached)" and a few other errors though my bios is up to date.

I haven’t had any issues for a while and this popped up all of a sudden. I tried doing a fresh install, but now can’t rebuild using my config files.

Any help would be appreciated. Thanks

I didn’t solve the issue, but figured out a workaround if anyone runs into this same issue. I made a bash script that keeps running the nixos-rebuild until it works. Might take a long time but it will rebuild the system eventually.


while true ; do
nixos-rebuild switch
[[ $exit_code == 0 ]] && break