niwaniwa0.1.2
saru-id/niwa
niwaniwa

Facts

Seven values a config can read about the machine it runs on. They are gathered once per run, so twenty guards asking the same question cost one answer.

niwa.machine.name

niwa.machine.name: string

The machine's short name, spelled the way hosts/<name>.luau expects it. Empty when the system will not say.

niwa.machine.owner

niwa.machine.owner: string

The account's full name. Empty when the system will not say.

niwa.machine.arch

niwa.machine.arch: string

The processor: "arm64" or "x86_64".

niwa.machine.os

niwa.machine.os: string

The macOS version, as sw_vers reports it. Empty when the system will not say.

niwa.machine.tags

niwa.machine.tags: { [string]: boolean }

This machine's tags, as a set: niwa.machine.tags.work is true when the tag is set. This is the one fact you author, through niwa tag.

niwa.brew.prefix

niwa.brew.prefix: string

Where Homebrew lives: "/opt/homebrew" on Apple silicon, "/usr/local" otherwise. HOMEBREW_PREFIX wins when it is set to an absolute path.

niwa.home

niwa.home: string

This run's home directory. Resource targets expand "~/" against it, so a rehearsal under --sandbox moves every path together.

Next

↑↓ navigate · enter opens · esc closes