feat(opencode): install kepano/obsidian-skills into ~/.agents/skills
Add obsidian-skills as a flake input (flake = false) and map each skill subdirectory into ~/.agents/skills/<skill>, alongside the existing local skills. Updates flow through `nix flake update obsidian-skills`.
This commit is contained in:
parent
b0fc627d0a
commit
a29301179b
3 changed files with 43 additions and 4 deletions
17
flake.lock
generated
17
flake.lock
generated
|
|
@ -672,6 +672,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"obsidian-skills": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1778185448,
|
||||
"narHash": "sha256-2kr8fmkuxRLaTy2O+dTv9K+75mRIqkLmaArw2/hj5uc=",
|
||||
"owner": "kepano",
|
||||
"repo": "obsidian-skills",
|
||||
"rev": "ac9398734fe719565809f7a6048b05c36b1ca38f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kepano",
|
||||
"repo": "obsidian-skills",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks-nix": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
|
|
@ -714,6 +730,7 @@
|
|||
"nix-homebrew": "nix-homebrew",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"obsidian-skills": "obsidian-skills",
|
||||
"rust-overlay": "rust-overlay_2",
|
||||
"simple-nixos-mailserver": "simple-nixos-mailserver",
|
||||
"snowfall-lib": "snowfall-lib",
|
||||
|
|
|
|||
|
|
@ -75,6 +75,11 @@
|
|||
|
||||
wyoming-whisper-rs.url = "git+https://git.hoyer.xyz/harald/wyoming-whisper-rs.git?submodules=1";
|
||||
wyoming-whisper-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
obsidian-skills = {
|
||||
url = "github:kepano/obsidian-skills";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -8,6 +9,19 @@ let
|
|||
inherit (lib.metacfg) mkBoolOpt;
|
||||
|
||||
cfg = config.metacfg.cli-apps.opencode;
|
||||
|
||||
obsidianSkills =
|
||||
lib.mapAttrs'
|
||||
(
|
||||
name: _:
|
||||
lib.nameValuePair ".agents/skills/${name}" {
|
||||
source = "${inputs.obsidian-skills}/skills/${name}";
|
||||
recursive = true;
|
||||
}
|
||||
)
|
||||
(
|
||||
lib.filterAttrs (_: type: type == "directory") (builtins.readDir "${inputs.obsidian-skills}/skills")
|
||||
);
|
||||
in
|
||||
{
|
||||
options.metacfg.cli-apps.opencode = {
|
||||
|
|
@ -20,9 +34,12 @@ in
|
|||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".agents/skills" = {
|
||||
source = ../../../../config/agents/skills;
|
||||
recursive = true;
|
||||
};
|
||||
home.file = {
|
||||
".agents/skills" = {
|
||||
source = ../../../../config/agents/skills;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
// obsidianSkills;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue