After some answers I got it.
The answers in other threads didn't work right away in Spacemacs (I'm really new to Emacs world so I don't know why), but mixing parts of them I managed to do it.
It's still not perfect. I would prefer to get the color from Emacs theme instead of using the color that hl-line figures out it should use, but I don't understand how to do it.
Thank you all for your help!
(defun dotspacemacs/user-config ()
(global-linum-mode t)
(unless window-system
(add-hook 'linum-before-numbering-hook
(lambda ()
(setq-local linum-format-fmt
(let ((w (length (number-to-string
(count-lines (point-min) (point-max))))))
(concat "%" (number-to-string w) "d"))))))
(defface my-linum-hl
`((t :inherit linum :background ,(face-background 'hl-line nil t)))
"Face for the current line number."
:group 'linum)
(defun my-linum-format-func (line)
(concat
;; (propertize (format linum-format-fmt line) 'face 'linum)
(propertize (format linum-format-fmt line) 'face 'my-linum-hl)
(propertize " " 'face 'mode-line)))
(unless window-system
(setq linum-format 'my-linum-format-func)))