Whether you are on macOS or NixOS, you can install and setup fonts in an unified fashion with Nix using home-manager.
For e.g., to install the Cascadia Code font:
{
home.packages = [
# Fonts
cascadia-code
];
fonts.fontconfig.enable = true;
}
See this issue for details.
Verify on macOS
To confirm that the font was successfully installed on macOS, you can open the Font Book app and search for the font. They will have been installed into ~/Library/Fonts/HomeManager
folder.