Is it possible to use nixos-rebuild but point to a different store?

I use a couple of Raspberry Pis.
Currently I’m using my notebook to build the config but I would like to try to use on of the Raspis for this.
However I don’t want to write all the data to the SD card but instead to an external drive.
Would this be possible?

I believe you can add --with-store-dir=/mnt/some/other/dir according to this. Another option is to symlink the store.

However, it sounds like either of these methods will force you to build everything from source, instead of relying on the binary cache. That could make building configs on Raspberry Pis even worse.

Unfortunately --with-store-dir doesn’t work with nixos-rebuild.
In the second link I’ve seen a mention of mount --bind maybe that would be an option.
However I don’t know yet what the consequences of that would be.

Mount the external drive as the store.

Then I would have to boot from it no?