You’ll need to first install Nix:
curl -L https://nixos.org/nix/install | sh
Then exit your terminal and start it again, so that the Nix environment loads.
Next you need to install Cachix:
nix-env -iA cachix -f https://cachix.org/api/v1/install
Then with the previously generated token:
sudo -H CACHIX_AGENT_TOKEN=... cachix deploy agent --bootstrap myagent
You should see an agent appear at your workspace.
Continue by making your first deployment for your agent.
If you need to troubleshoot:
If the agent doesn’t start, check tail -f /var/log/cachix-agent.log.
If you want to restart the agent, run sudo launchctl kickstart -k system/org.nixos.cachix-agent