A self-signed or internal certificate gives curl error 60, and `-k` is the tempting but dangerous way out.
curl --cacert /etc/ssl/homelab-ca.pem https://nas.lan:8443/
-k switches certificate checks off, so it also accepts a certificate from someone sitting in the middle. --cacert replaces the default bundle with the one CA file you name, which keeps the check intact and still accepts your internal certificate. Setting CURL_CA_BUNDLE in the environment does the same for every call. To trust the CA system-wide, copy it to /usr/local/share/ca-certificates/ and run update-ca-certificates.
Further reading: curl manual
Going deeper: Run degoog on Unraid as your own search page, compared with SearXNG and 4get