Based on https://nixos.org/wiki/ZFS_on_NixOS I did the following
Added
boot.supportedFilesystems = [ "zfs" ];
to configuration.nix
Then run
nixos-rebuild switch
modprobe zfs
zpool create -f -o ashift=12 -m /mnt/zdata zdata \
mirror \
ata-TOSHIBA_HDWD130_Y6CJLGNAS \
ata-TOSHIBA_HDWD130_Y6CJGJMAS
zfs create -o mountpoint=legacy zdata/home
zfs create -o mountpoint=legacy zdata/roothome
mount -t zfs zdata/home /home
mount -t zfs zdata/roothome /root
nixos-generate-config
nixos-rebuild switch
All of the above seems to work correctly, however on reboot my zpool disappears and I have to run zpool import zdata
to get the pool back.