In this paper, we study the early stages of aggregation of a model of polyglutamine (polyQ) for different repeat lengths (number of glutamine amino acid groups in the chain). In particular, we use the Large-scale Atomic/Molecular Massively Parallel Simulator to study a generic coarse-grained model proposed by Bereau and Deserno. We focus on the primary nucleation mechanism involved and find that our results for the initial self-assembly process are consistent with the two-dimensional classical nucleation theory of Kashchiev and Auer. More specifically, we find that with decreasing supersaturation, the oligomer fibril (protofibril) transforms from a one-dimensional β sheet to two-, three-, and higher layer β sheets as the critical nucleus size increases. We also show that the results are consistent with several predictions of their theory, including the dependence of the critical nucleus size on the supersaturation. Our results for the time dependence of the mass aggregation are in reasonable agreement with an approximate analytical solution of the filament theory by Knowles and collaborators that corresponds to an additional secondary nucleation arising from filament fragmentation. Finally, we study the dependence of the critical nucleus size on the repeat length of polyQ. We find that for the larger length polyglutamine chain that we study, the critical nucleus is a monomer, in agreement with experiment and in contrast to the case for the smaller chain, for which the smallest critical nucleus size is four.