Tag-Based Filtering
Automatic Tags
Section titled “Automatic Tags”Every name in the configuration is automatically registered as a tag:
- Flake names (e.g.
infrastructure) - Output types (e.g.
nixosConfigurations,homeConfigurations) - Installable attribute names (e.g.
webserver) - Machine names (e.g.
web-01)
Tag Inheritance
Section titled “Tag Inheritance”Set tags at fleet, flake, installable, or machine level. Tags accumulate through inheritance, never override: a machine’s resolved tags are the union of the tags fields of all levels above it plus the automatic tags.
fleet: tags: [production] flakes: infrastructure: tags: [critical] installables: nixosConfigurations: webserver: tags: [web] machines: web-01: web-02:The resolved tags for web-01 are production, critical, web, infrastructure, webserver, nixosConfigurations, and web-01. Tags are matched by membership, so the order of the resolved tags does not matter.
Filtering
Section titled “Filtering”Pass --tags to panix deploy to select the machines matching any of the given tags. Multiple tags are comma-separated and match with OR semantics:
panix deploy --tags production # all production-tagged machinespanix deploy --tags web,nixosConfigurations # machines matching either tagSee the panix deploy reference for details.