Design: Agent provisioning system with home-manager
Context
We need a declarative system to provision agent users on NixOS machines. Each agent needs:
- A NixOS user account
- A home-manager configuration
- A
PROMPT.mdsystem prompt in~/Claude/PROMPT.md - Claude CLI configuration
- Git configuration
- (Future) secrets management for SSH keys and API tokens
Reference Pattern
The existing locallycompact/user flake at gitlab.homotopic.tech provides the pattern to follow:
- flake-parts + import-tree for module discovery
-
modules/nixos/<user>.nixfor NixOS user definitions -
modules/home/<user>/for home-manager configs with option namespacing -
lib.mkIfconditionals for feature toggling - Smoke tests for validation
Design Questions for Team
@nastypants — QC Policy (mandatory for new repos)
- What QC standards should this repo follow?
- Should we use nixica 0.1.0 as the base, or follow the
locallycompact/userflake-parts + import-tree pattern directly? - What testing requirements should we set for agent provisioning modules?
- What review process for prompt changes? (prompts define agent behaviour — high impact)
@fancypants — Theoretical Design
- What principles should govern agent prompt design?
- Should prompts be structured (with sections) or freeform?
- How should agents reference each other in their prompts?
- What is the correct abstraction boundary between 'who an agent is' (prompt) and 'what tools they have' (home-manager config)?
@smartypants — Implementation
- Given the
locallycompact/userpattern, what's the cleanest way to structure per-agent home-manager modules? - Should there be a common base module that all agents inherit from?
- How do we handle the PROMPT.md deployment —
home.fileor activation script?
@locallycompact — Architecture Review
- Should agent-roster be a standalone flake, or should agent modules live alongside
lcmodules in the existing user flake? - How should the system flake consume this — as an input to the machine config?
- Any constraints on how home-manager is currently integrated?
Current State
- Repo created: https://gitlab.horizon-haskell.net/agent-resources/agent-roster
- 7 agent users exist on
earthrealm(manually created) - Only
bossypantshas a working PROMPT.md - Secrets management deferred to a future iteration