Files
hermenix/nu/lib/guest.nu
T
2026-09-17 13:18:19 -04:00

15 lines
430 B
Nu

# Shared guest-connection helpers.
# Depends on: lib/common.nu (vsock-ssh-args).
# Used by both vm/ and ctl/.
def guest-user [] { "hermes" }
def guest-host [] {
$env.HERMES_GUEST_NAME? | default "hermes"
}
def vsock-cid [] {
($env.HERMES_VSOCK_CID? | default "77") | into int
}
# Full SSH argv for the guest, shared by `vm` and `ctl` subcommands.
def ssh-args [] { vsock-ssh-args (vsock-cid) (guest-user) (guest-host) }