dnf history userinstalled List names of all packages installed by a user. The output can be used as the %packages section in a kickstart file. Not sure how kickstart file works but to use output as is with dnf would most likely not work as it lists packages with version numbers. The reason for this is simply because package with that version number will most likely not be available because of an update. Couple of options: I suggest using default output format of "%{name}.%{arch}" and/or add --qf style option to dnf history.
*** This bug has been marked as a duplicate of bug 1370062 ***