How can I nail baseboard to a brickwall?
Down at the DIY centre they will have the Clout nails you need - just ask!
If you are going the clout nail route, you will also need a drill and a bit that is smaller than the nails. You drill into the mortar not the brick. I personally would use screws and anchors, primarily because I am haphazard with the hammer and fear cracking the brick. Go for the nails, if your aim is true :)
Here's a post that might help - https://homeguides.sfgate.com/install-baseboards-brick-wall-22658.html
maybe liquid nail adhesive instead?
You can glue it or use masonry nails. They are chiseled for concrete and other masonry type applications.