Using at sign (@) in usernames linux. Is it safe?

I'd say it isn't good idea.

I'd recommend to use simple regex:

([a-z_][a-z0-9_]{0,30})

Check following links:

https://stackoverflow.com/questions/6949667/what-are-the-real-rules-for-linux-usernames-on-centos-6-and-rhel-6

https://unix.stackexchange.com/questions/157426/what-is-the-regex-to-validate-linux-users


Using '@' in a username would make it impossible to use that username as the local-part of an email address, so I would say that is not a good idea.