If you encountered the offline error when trying to switch, then the switch did not get applied and you still won’t have the cert trusted.
Try using
nixos-rebuild switch --option substitute false
for the first switch, that should remove any network requests from it and allow you to add the cert as trusted. If you didn’t change anything else then it should succeed.