Define whether fleet registries collect guest declarations #65
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The current registry collector treats the fleet as top-level NixOS hosts only.
It reads
self.nixosConfigurations.<host>.config.registryand does not collect registry declarations from guest interiors such asconfig.containers.<guest>.config.registry.That was easy to miss because existing guest address and route entries are published by host-side guest helper code.
Service modules enabled only inside guests can publish local guest registry entries, but those entries are invisible to
self.lib.registry.collect { hosts = self.nixosConfigurations; }.PR 64 works around this for
registry.stable-uidby keeping stable UID declarations unconditional in service modules.That makes top-level host evaluations publish the allocations even when the service itself only runs inside a guest.
This is acceptable for that PR, but it leaves the broader meaning of fleet registries underspecified.
Options discussed
This is small and works for stable UIDs, but it does not fix guest registry collection.
This avoids a broad collector change, but risks one-off plumbing and duplicated ownership rules.
This better matches the word fleet and would let guest-local registry declarations participate in the collected registry, but it needs explicit naming, collision, and recursion handling.
Acceptance shape for a future fix
A future design should decide whether fleet registry collection includes guest interiors.
If it does, the implementation should define how guest keys are named, how duplicate guest names across hosts are handled, and how cycles are avoided when guests also receive the collected
registryspecial arg.— Claude