The 32-year-old former Wrexham and Mansfield centre-back wants to be a part of another promotion challenge.
It comes after the club last week signed striker Reece Styche, and having yesterday convinced Kidderminster goalkeeper Brandon Hall.
Riley thinks the Bulls squad is starting to take shape already as Marc Richards’ men plot a season at the right end of the National League North.
“I’m really pleased to have agreed a deal to come to Edgar Street and am excited about our prospects for next season,” Riley, who played last season for Alfreton, told the club’s official website.
“I’ve played here on several occasions over the years and have always found it a tough place to come and get a result.
“I’ll bring a great deal of experience with me – mostly in the National League and League Two – and I’m looking forward to getting to know the other lads.
“Obviously, I already know Reece Styche and Josh Gowling which should certainly help me settle in.
“I’m already beginning to look forward to the start of pre-season training and I’m pleased to have got myself fixed up for next season, as that means I can now focus on getting myself ready for the challenges that lie ahead.”