feat(ai): use agentsDir for agents
This commit is contained in:
parent
f1aba9cab6
commit
cf2b9912f4
3 changed files with 18 additions and 0 deletions
|
|
@ -24,6 +24,17 @@ in {
|
|||
description = "Custom agents passed through to programs.claude-code.agents.";
|
||||
};
|
||||
|
||||
agentsDir = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
description = ''
|
||||
Absolute path to a directory of agent .md files. Symlinked directly into
|
||||
the claude agents directory so edits are picked up without re-applying
|
||||
home-manager. Mutually exclusive with agents.
|
||||
'';
|
||||
example = "/home/user/git/nixos-system/common/home-manager/ai-agents/agents";
|
||||
};
|
||||
|
||||
commands = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
|
|
@ -131,5 +142,10 @@ in {
|
|||
hooks = cfg.hooks;
|
||||
memory = cfg.memory;
|
||||
};
|
||||
|
||||
home.file = lib.mkIf (cfg.agentsDir != null) {
|
||||
"${config.programs.claude-code.configDir}/agents".source =
|
||||
config.lib.file.mkOutOfStoreSymlink cfg.agentsDir;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
cfg = config.ai-agents;
|
||||
in {
|
||||
imports = [
|
||||
./claude.nix
|
||||
./mcp.nix
|
||||
./lsp.nix
|
||||
./skills.nix
|
||||
|
|
|
|||
|
|
@ -111,6 +111,7 @@ in {
|
|||
|
||||
ai-agents = {
|
||||
enable = true;
|
||||
claude-code.agentsDir = "${config.home.homeDirectory}/git/nixos-system/common/home-manager/ai-agents/agents";
|
||||
mcp = {
|
||||
atlassian.enable = false;
|
||||
context7 = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue