"SSL peer certificate or SSH remote key was not OK" error on fresh Nix install on macOS

sorry for the necro thread, but I solved a similar issue: