Hot Topic Inc. has agreed to buy Geeknet Inc. for about $122 million, paying more than double the market value for the “geek”-focused retailer.

The offer of $17.50 a share is a significant premium to Geeknet’s last closing price of $7.90 a share.

Geeknet is the parent company of online retailers ThinkGeek and ThinkGeek Solutions, which sell...