Profiles and Global Detectors

Profiles and Global Detectors

This example shows how to use a root hermit.toml to define global configurations like profiles and detectors that can be used by all other configurations.

Highlights

  • Profiles: Group related configurations under a single name like default for easy setup.
  • Global Detectors: Define detectors that create tags based on the environment (e.g., +k8s if kubectl is present).
  • Environment Awareness: Detect if running inside a container.
[detectors]
is_container = { enable_if_not = "grep -q 'systemd' /proc/1/cmdline" }
k9s = { enable_if = "command -v kubectl" }
k8s = { enable_if = "command -v kubectl" }

[profiles]
default = ["bashrc", "bat", "eza", "fd", "fish", "ripgrep", "starship"]