if you have flakes enabled:
nix shell github:DavHau/mach-nix
works
I would just capture mach-nix in your shell.nix or devShell in your flake.nix. Then pair it with direnv to allow you to bring it into your shell when you need it for a particular project