Our infrastructure code is finally public: https://gitea.kosmos.org/kosmos/chef/issues
You can find our Mastodon setup in there, as well as config most other services we run. Feel free to open issues, in case you find something broken, or you want to propose a change. PRs accepted as well, of course.