The R4 is supposed to be able to run nds homebrew, as are all other slot-1 solutions. I haven't tried it, though. I know my Acekard2 runs homebrew fine.
For GBA games, the best solution is the EZFlash 3-in-1 cartridge. For the R4, you need an additional GBA loader, which might be hard to find...