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:
Harald Hoyer 2026-05-16 10:04:34 +02:00
parent b0fc627d0a
commit a29301179b
3 changed files with 43 additions and 4 deletions

17
flake.lock generated
View file

@ -672,6 +672,22 @@
"type": "github" "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": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@ -714,6 +730,7 @@
"nix-homebrew": "nix-homebrew", "nix-homebrew": "nix-homebrew",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"obsidian-skills": "obsidian-skills",
"rust-overlay": "rust-overlay_2", "rust-overlay": "rust-overlay_2",
"simple-nixos-mailserver": "simple-nixos-mailserver", "simple-nixos-mailserver": "simple-nixos-mailserver",
"snowfall-lib": "snowfall-lib", "snowfall-lib": "snowfall-lib",

View file

@ -75,6 +75,11 @@
wyoming-whisper-rs.url = "git+https://git.hoyer.xyz/harald/wyoming-whisper-rs.git?submodules=1"; wyoming-whisper-rs.url = "git+https://git.hoyer.xyz/harald/wyoming-whisper-rs.git?submodules=1";
wyoming-whisper-rs.inputs.nixpkgs.follows = "nixpkgs"; wyoming-whisper-rs.inputs.nixpkgs.follows = "nixpkgs";
obsidian-skills = {
url = "github:kepano/obsidian-skills";
flake = false;
};
}; };
outputs = outputs =

View file

@ -1,6 +1,7 @@
{ {
lib, lib,
config, config,
inputs,
... ...
}: }:
let let
@ -8,6 +9,19 @@ let
inherit (lib.metacfg) mkBoolOpt; inherit (lib.metacfg) mkBoolOpt;
cfg = config.metacfg.cli-apps.opencode; 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 in
{ {
options.metacfg.cli-apps.opencode = { options.metacfg.cli-apps.opencode = {
@ -20,9 +34,12 @@ in
recursive = true; recursive = true;
}; };
home.file.".agents/skills" = { home.file = {
".agents/skills" = {
source = ../../../../config/agents/skills; source = ../../../../config/agents/skills;
recursive = true; recursive = true;
}; };
}
// obsidianSkills;
}; };
} }