The fatty acid in both Flaxseed and Walnuts you are referring to is alpha Linolic acid (ALA), whereas fish contains Eicosapentaenoic acid (EPA) and Docosahexaenoic acid (DHA). Out of these, only DHA is found in the brain. If DHA is not present in the diet, ALA can be converted into it, but only at an extremely low rate of efficiency [1]
The only reliable vegan source of DHA I am aware of is certain types of algae. Additionally, by consuming extremely large quantities of nuts you will typically be overloading your copper to zinc ratio.
[1] http://dx.doi.org/10.1186%2F1476-511X-8-33 "Are all n-3 polyunsaturated fatty acids created equal?"