-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Description
When using programs.clawdbot.firstParty.<plugin>.enable = true, the plugins are correctly resolved and included in instances.*.plugins, but the skill files are not being generated in home.file.
Expected Behavior
Skills from first-party plugins should be symlinked/copied to ~/.clawdbot/workspace/skills/<plugin-name>/ via home-manager's home.file mechanism.
Actual Behavior
Only the document files (AGENTS.md, SOUL.md, TOOLS.md) appear in home.file under .clawdbot/workspace/. No skill directories are created.
Investigation
- Plugins are correctly resolved:
nix eval --json '.#homeConfigurations.<name>.config.programs.clawdbot.instances.default.plugins' | jq 'length'
# Returns: 5 (for summarize, peekaboo, oracle, poltergeist, imsg)- Plugin flakes DO have skills defined:
# From tools/summarize/flake.nix
clawdbotPlugin = {
name = "summarize";
skills = [ ./skills/summarize ];
# ...
};- Skills resolve to valid nix store paths when tested directly:
nix eval --impure --expr 'let flake = builtins.getFlake "github:clawdbot/nix-steipete-tools/e4e2cac...?dir=tools/summarize"; in flake.clawdbotPlugin.skills'
# Returns: [ /nix/store/...-source/tools/summarize/skills/summarize ]- But
home.fileonly shows documents, no skills:
nix eval --json '.#homeConfigurations.<name>.config.home.file' | jq 'keys | map(select(startswith(".clawdbot")))'
# Returns: [".clawdbot/workspace/AGENTS.md", ".clawdbot/workspace/SOUL.md", ".clawdbot/workspace/TOOLS.md"]Suspected Cause
The pluginSkillsFiles function in nix/modules/home-manager/clawdbot.nix iterates over enabledInstances and calls resolvedPluginsByInstance, but the resulting entries may not be properly merged into home.file.
Relevant code (lines ~420-435):
pluginSkillsFiles =
let
entriesForInstance = instName: inst:
let
base = "${toRelative (resolvePath inst.workspaceDir)}/skills";
skillEntriesFor = p:
map (skillPath: {
name = "${base}/${p.name}/${builtins.baseNameOf skillPath}";
value = { source = skillPath; recursive = true; };
}) p.skills;
plugins = resolvedPluginsByInstance.${instName} or [];
in
lib.flatten (map skillEntriesFor plugins);
in
lib.listToAttrs (lib.flatten (lib.mapAttrsToList entriesForInstance enabledInstances));Environment
- nix-clawdbot rev: f73c4f3
- nix-steipete-tools rev: e4e2cac265de35175015cf1ae836b0b30dddd7b7
- Platform: macOS (aarch64-darwin)
- Nix version: 2.28.x
Workaround
Using programs.clawdbot.skills to manually define skills as a workaround.