Add --root /mnt to the nixos-install invocation.
--root /mnt
nixos-install
--root /mnt nixos-install --flake /mnt/etc/nixos#… or what?
Actually, the default is /mnt, so the issue lies somewhere else.
/mnt