@guycalledxan like this:
<% app.internalPlugins.plugins.sync.instance.deviceName %>
You can find things like this by typing app
(then press Enter) in the Developer console in Obsidian (Ctrl + Shift + I), and then browsing around.
As a side note, I’d never considered doing this, but it’s quite a cool idea. It also got me thinking that I could check if I’m on my home network and then set a property of home or not. Lots of interesting metadata you could add.