Is NOBODY wrong in the post ? POST : TLDR at end

I work in a small environment and there's only about 18 employees. We work at a sandwich shop and most of us have known each other for years 

 I have one coworker who I cannot stand. He's lazy, we have few similar interests, he's a liar, and a chatty cathy (mostly about gossip between our coworkers that is not directly related to either one of us). I have another job in the evening as a bartender so I already have enough drama from my regulars there, I would like to just go into my day job do my work and go home.

So I finally had it today. For the past month I had been actively avoiding him UNLESS it is work related. He occasionally tries to chat about my personal life or gossip with me.

I was working on the prep list while he went to shoot the shit with my boss out back smoking a cig (it's lunch rush and they always take forever). We got really busy my coworker and I had to manage the store for almost 25 mins. They finally come back from their smoke break when it's dying down and I continue my prep work. He nonchalantly came up to me and asked if I heard about the new superhero movie coming out. He literally asks me this once every two weeks. I usually respond I'm not into those movies.

So this was my breaking point.I turned to him and told him not to talk to me anymore UNLESS it's work related. He walked away. I am aware I hurt his feelings (my boss pulled me aside and asked me to be nicer to him) I do not like the guy and try to avoid him. Am I the Asshole? 

TLDR:  Am I the asshole for telling my coworker to not talk to me UNLESS it is work related?