Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AI Editors & Assistants — AI-Assisted Development Tooling

Purpose

The purpose.development.editors.ai Home-Manager module configures editor and agent tooling for AI-assisted development, centered around OpenCode and shared skill directories.

Entry Point

Architecture / Services / Scope

When enabled, the module:

  • Ensures a shared AI filesystem directory exists at activation time.
  • Adds useful global git ignores (e.g. editor workspace and tool-state directories).
  • Configures Zed to expose an OpenCode agent server.
  • Enables and configures programs.opencode with:
    • plugins
    • Nix formatter integration
    • LSP integrations across Nix, config formats, and general-purpose languages
    • command permissions policy
    • a local MCP server (e.g. mcp-nixos via uvx)
  • Writes OpenCode config files (e.g. ~/.config/opencode/oh-my-opencode.json, opencode-notifier.json).
  • Registers AI skills under ~/.agents/skills/<name> via home.file.
  • Persists OpenCode state directories so they survive reboots on impermanence-based systems.

Options

purpose.development.editors.ai.enable

Typeboolean
Defaultfalse
Exampletrue

Whether to enable Enable AI Tools & Assistants.


purpose.development.editors.ai.includeDefaults

Typeboolean
Defaulttrue

Whether to include the default set of agents and skills provided by this module. This includes the agents and skills defined in the ./agents and ./skills directories of this module.

Disabling this will result in a minimal setup with only the base configuration for OpenCode and no pre-registered agents or skills.


purpose.development.editors.ai.skills

Typelist of string
Default[ ]
Example'' [ ''${inputs.my-skill-repo}/skills/my-skill ''${self}/skills/another-skill ] ''

List of additional AI skills to add to the global registry. These should be paths to a skill directory, this could be through a flake input or a path in the flake.

These skills will be installed to ~/.agents/skills and will be available to all agents that support the skill system, such as Claude and OpenCode.


purpose.development.editors.ai.tabby.enable

Typeboolean
Defaultfalse
Exampletrue

Whether to enable Tabby agent for tab completion.


Usage Example

{ self, inputs, ... }: {
  purpose.development.editors.ai = {
    enable = true;
    includeDefaults = true;

    skills = [
      "${inputs.my-skill-repo}/skills/my-skill"
      "${self}/skills/another-skill"
    ];
  };
}

Operational Notes / Assumptions

  • Skill links are generated under ~/.agents/skills/<basename>.
  • Default skills are discovered automatically from the module’s local skills/ directory when includeDefaults = true.
  • The module currently defines default agent discovery as well, but only skill link materialization is active in home.file output.