Saving input settings w/ --libretro command

So, I’m trying to set up Emulationstation with Retroarch/Libretro. To open a NES game, I use the command

retroarch --fullscreen --config ~/retroarch.cfg --libretro ~/cores/libretro-fceumm.so %ROM%

It opens Retroarch/FCEUMM fine, but it uses the default keyboard input system. Same with MAME, and everything else. How do I make the input either carry over from Retroarch (it currently isn’t because of the --libretro flag), or to set it for the FCEUMM core? Thanks!