Copying to system clipboard on macOS with tmux 2.7 and mouse mode

You will also need to install reattach-to-user-namespace with, for example, brew install reattach-to-user-namespace.
Remember also to run tmux kill-server to actually see the changes. Note that doing this will kill your tmux server. :)
These sorts of blog posts are quite tedious, but this one exists because tmux has changed the syntax required to do this about one billion times (judging by the diversity of posts out there about it). The way to do this depends on:

Your OS -- it's obviously macOS-specific but may also only apply to Mojave or High Sierra upwards -- in particular, apparently some versions of macOS / terminal combination don't need reattach-to-user-namespace,

Your version of tmux. From what I can tell, but haven't verified, the above settings are valid on tmux 2.4 and above, and

Your other tmux configuration. This setting is for vi copy mode. If you aren't using vi copy mode, you can enable it with the setting set-window-option -g mode-keys vi.