nixos-rebuild also allows to specify different flake using the --flake flag (# is optional):
nixos-rebuild
--flake