Install pinned pstack skills on activation #14
@@ -11,6 +11,28 @@ let
|
|||||||
ytTranscribe = pkgs.runCommand "yt-transcribe" { } ''
|
ytTranscribe = pkgs.runCommand "yt-transcribe" { } ''
|
||||||
install -Dm755 ${./home/bin/yt-transcribe} $out/bin/yt-transcribe
|
install -Dm755 ${./home/bin/yt-transcribe} $out/bin/yt-transcribe
|
||||||
'';
|
'';
|
||||||
|
# Pinned pstack skills tree (cursor/plugins). `tdd` is deliberately absent:
|
||||||
|
# the captain's own tdd skill owns that name. See firstmate's
|
||||||
|
# docs/adopted-skills.md for why these eleven skills exist.
|
||||||
|
pstackSkillNames = [
|
||||||
|
"statechart"
|
||||||
|
"create-verification-skill"
|
||||||
|
"maintain-verification-skill"
|
||||||
|
"correct"
|
||||||
|
"benchmark-checklist"
|
||||||
|
"architect"
|
||||||
|
"technical-writing"
|
||||||
|
"unslop"
|
||||||
|
"recall"
|
||||||
|
"ketchup"
|
||||||
|
"blast-radius"
|
||||||
|
];
|
||||||
|
pstackSkills = pkgs.fetchFromGitHub {
|
||||||
|
owner = "cursor";
|
||||||
|
repo = "plugins";
|
||||||
|
rev = "6b0300214a09fd6029cfb7077043125758cd1fd2";
|
||||||
|
hash = "sha256-TDuZ1v+taPdqyvvCs1VHUjtpSy8zHxhQKJv/kIPTpK8=";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -481,6 +503,42 @@ in
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# pstack skills adopted from https://github.com/cursor/plugins at commit
|
||||||
|
# 6b0300214a09fd6029cfb7077043125758cd1fd2 (folder pstack/skills), pinned via
|
||||||
|
# the fetchFromGitHub above. The record of why these eleven skills exist is
|
||||||
|
# firstmate's docs/adopted-skills.md. They live only in ~/.agents/skills, which
|
||||||
|
# is outside git and Nix, so this block restores them on a fresh machine.
|
||||||
|
# `tdd` is skipped on purpose: the captain's own tdd skill owns that name.
|
||||||
|
# Each run replaces only the eleven target directories; every other skill,
|
||||||
|
# including the captain's own, stays untouched. No `exit 0` here: activation
|
||||||
|
# blocks are inlined into one flat script, so an early exit would skip the
|
||||||
|
# blocks that follow.
|
||||||
|
home.activation.pstackSkills = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
set -euo pipefail
|
||||||
|
src="${pstackSkills}/pstack/skills"
|
||||||
|
dest="$HOME/.agents/skills"
|
||||||
|
if [ ! -d "$src" ]; then
|
||||||
|
echo "pstackSkills: pinned source tree missing at $src" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
mkdir -p "$dest"
|
||||||
|
for name in ${lib.concatStringsSep " " pstackSkillNames}; do
|
||||||
|
if [ ! -d "$src/$name" ]; then
|
||||||
|
echo "pstackSkills: pinned source is missing skill $name" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Remove first so a renamed source file never lingers in the old copy.
|
||||||
|
rm -rf "$dest/$name"
|
||||||
|
if ! cp -R "$src/$name" "$dest/$name"; then
|
||||||
|
echo "pstackSkills: failed to install $name" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# Store files are read-only; make the installed copy writable again.
|
||||||
|
chmod -R u+w "$dest/$name"
|
||||||
|
done
|
||||||
|
echo "pstackSkills: installed ${toString (lib.length pstackSkillNames)} pinned skills into $dest"
|
||||||
|
'';
|
||||||
|
|
||||||
# OpenSuperWhisper - local voice-first prompting (cask in configuration.nix).
|
# OpenSuperWhisper - local voice-first prompting (cask in configuration.nix).
|
||||||
# The app reads its model from its own Application Support directory, so the
|
# The app reads its model from its own Application Support directory, so the
|
||||||
# 1.6 GB Whisper model is downloaded here once and kept outside the Nix store.
|
# 1.6 GB Whisper model is downloaded here once and kept outside the Nix store.
|
||||||
|
|||||||
Reference in new issue
Block a user