side note, you can obviate the hassle of using the system hostname command by using the vim.uv.os_gethostname() function.
hostname
vim.uv.os_gethostname()