Local SSL dev cert in dev shell

I’m working on an HTTP server that uses SSL and I’d like to have a development self-signed SSL cert and private key available inside of my flake’s dev shell for use with said HTTP server. Is it possible to generate this upon entering the dev shell and have it trusted within the environment inside the dev shell without modifying the global system configuration? I’d be testing this with a browser so it’d be nice if I could launch a browser from the dev shell and have the cert be trusted already.

If this isn’t feasible how do people usually do this? Do they create a single dev cert as part of their system configuration and share it across projects that need it? In this case I think it’d be more hassle to share this project with other developers if it wasn’t contained within the dev shell so I’m curious.