feat: agent-lib exlude agents

This commit is contained in:
2026-05-31 14:10:15 +02:00
parent 7c5b92c377
commit a9ffe3ed28
7 changed files with 962 additions and 296 deletions
+38 -18
View File
@@ -1,5 +1,6 @@
{
config,
lib,
pkgs,
inputs,
...
@@ -7,25 +8,44 @@
# Edge TTS: Seraphina — friendly, multilingual German female voice (free, no API key)
edgeVoice = "de-DE-SeraphinaMultilingualNeural";
# Build skills using agents flake lib for hermes user
hermesSkills = inputs.agents.lib.mkSkills {
inherit pkgs;
customSkills = "${inputs.agents}/skills";
externalSkills = [
{
src = inputs.skills-basecamp;
skillsDir = "skills";
}
{
src = inputs.skills-anthropic;
skillsDir = "skills";
}
{
src = inputs.skills-kestra;
skillsDir = "skills";
}
];
agentLock = builtins.fromJSON (builtins.readFile ../../../agent-sources.lock.json);
agentSkillSelections = {
m3ta-agents.exclude = [];
anthropic.exclude = ["pdf" "skill-creator" "xlsx"];
basecamp.exclude = [];
kestra.exclude = [];
mattpocock.exclude = ["grill-me" "caveman"];
superpowers.exclude = ["brainstorming" "systematic-debugging"];
vercel.exclude = [];
};
sourceRoot = source:
builtins.fetchGit {
inherit (source) url rev;
};
selectedSkillNames = sourceName: let
source = agentLock.sources.${sourceName};
excluded = agentSkillSelections.${sourceName}.exclude;
in
lib.subtractLists excluded (builtins.attrNames source.items.skills);
copySkill = sourceName: skillName: let
source = agentLock.sources.${sourceName};
item = source.items.skills.${skillName};
in ''
cp -R ${sourceRoot source}/${source.root}/${item.path} $out/${skillName}
'';
copySourceSkills = sourceName:
lib.concatMapStringsSep "\n" (copySkill sourceName) (selectedSkillNames sourceName);
# Build skills from the agent-lib lockfile instead of the legacy AGENTS flake.
hermesSkills = pkgs.runCommand "hermes-agent-lib-skills" {} ''
mkdir -p $out
${lib.concatMapStringsSep "\n" copySourceSkills (builtins.attrNames agentSkillSelections)}
'';
in {
virtualisation.docker.enable = true;