You can have it clone your dotfiles repo automatically and run a set-up script:
https://docs.github.com/en/codespaces/customizing-your-codes...
I also have a very bespoke dotfiles config that predates Codespaces (https://github.com/wincent/wincent), so I made a thin wrapper around it that makes it work (https://github.com/wincent/dotfiles). For people with less complicated set-ups (ie. basically the entire universe), it is pretty straightforward.