Just asked the same question in Matrix (Props at @K900), here’s the answer:
$ nix shell "github:NixOS/nix/2.18.4"
$ nix build <path-to-flake>#nixosConfigurations.<machine>.config.system.build.toplevel
$ sudo nix-env --profile /nix/var/nix/profiles/system --set ./result
$ ./result/bin/switch-to-configuration switch