Adding the following data point, when exclusively on mobile data connection I can reliably run a command like the next, but as soon as wifi (over home router) comes into play, I get the ssl errors again:
NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt nix run .#setup --impure
nix started working after I rebooted my laptop. I’m not exactly sure what made it work. It might’ve been something else I tried. But I’m super happy that it’s working again. I was afraid I might need to wipe out nix and reinstall it over the weekend.
Maybe a better solution than the environment variable: On my Arch Linux machine with nix installed it was enough to start my systemd-timesyncd.service that was not started for some reason anyway to make the errors disappear.
Had the issue on a non-NixOS system as well as on a nix-on-droid instance (android TM device) and for the latter I did set the ntp_server manually to fix the error (link).