There are 2 issues here:
- an unavailable cache prevents you from moving forward, which is indeed a problem, and
- changing the nix configuration when you cannot run
nixos-rebuildand friends
As for the latter, remember, there is nothing preventing you from manually editing the files under /etc.
So you can:
sudo cp $(realpath /etc/nix/nix.conf) /etc/nix/nix.conf
sudo chmod 644 /etc/nix/nix.conf
# change whatever you want in your editor of choice
sudo systemctl restart nix-daemon