better claude symlinks
This commit is contained in:
@@ -1,68 +1,36 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home.file.".default-npm-packages".text = ''
|
||||
@anthropic-ai/claude-code
|
||||
'';
|
||||
|
||||
# Create writable commands/skills directories and symlink files
|
||||
home.activation.claudeCommandsDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
COMMANDS_DIR="$HOME/.claude/commands"
|
||||
SKILLS_DIR="$HOME/.claude/skills"
|
||||
SETTINGS_FILE="$HOME/.claude/settings.json"
|
||||
# Commands
|
||||
home.file.".claude/commands/merge.md".source = ./commands/merge.md;
|
||||
home.file.".claude/commands/update.md".source = ./commands/update.md;
|
||||
home.file.".claude/commands/work.md".source = ./commands/work.md;
|
||||
|
||||
# Remove old symlinks if they exist
|
||||
if [ -L "$COMMANDS_DIR" ]; then
|
||||
$DRY_RUN_CMD rm -f "$COMMANDS_DIR"
|
||||
fi
|
||||
if [ -L "$SKILLS_DIR" ]; then
|
||||
$DRY_RUN_CMD rm -f "$SKILLS_DIR"
|
||||
fi
|
||||
# Skills: agents
|
||||
home.file.".claude/skills/designer-bold/SKILL.md".source = ./skills/designer-bold/SKILL.md;
|
||||
home.file.".claude/skills/designer/SKILL.md".source = ./skills/designer/SKILL.md;
|
||||
home.file.".claude/skills/analyze-branch/SKILL.md".source = ./skills/analyze-branch/SKILL.md;
|
||||
home.file.".claude/skills/oracle/SKILL.md".source = ./skills/oracle/SKILL.md;
|
||||
home.file.".claude/skills/librarian/SKILL.md".source = ./skills/librarian/SKILL.md;
|
||||
|
||||
# Create directories
|
||||
$DRY_RUN_CMD mkdir -p "$COMMANDS_DIR"
|
||||
$DRY_RUN_CMD mkdir -p "$SKILLS_DIR"
|
||||
# Skills: knowledge
|
||||
home.file.".claude/skills/git-master/SKILL.md".source = ./skills/git-master/SKILL.md;
|
||||
home.file.".claude/skills/planning-with-files/SKILL.md".source = ./skills/planning-with-files/SKILL.md;
|
||||
home.file.".claude/skills/react-patterns/SKILL.md".source = ./skills/react-patterns/SKILL.md;
|
||||
home.file.".claude/skills/vercel-react-best-practices/SKILL.md".source = ./skills/vercel-react-best-practices/SKILL.md;
|
||||
|
||||
# Commands
|
||||
$DRY_RUN_CMD ln -sf ${./commands/merge.md} "$COMMANDS_DIR/merge.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/update.md} "$COMMANDS_DIR/update.md"
|
||||
$DRY_RUN_CMD ln -sf ${./commands/work.md} "$COMMANDS_DIR/work.md"
|
||||
# Skills: workflows
|
||||
home.file.".claude/skills/smart-debug/SKILL.md".source = ./skills/smart-debug/SKILL.md;
|
||||
home.file.".claude/skills/tdd-cycle/SKILL.md".source = ./skills/tdd-cycle/SKILL.md;
|
||||
home.file.".claude/skills/security-scan/SKILL.md".source = ./skills/security-scan/SKILL.md;
|
||||
home.file.".claude/skills/issue/SKILL.md".source = ./skills/issue/SKILL.md;
|
||||
home.file.".claude/skills/remove-deadcode/SKILL.md".source = ./skills/remove-deadcode/SKILL.md;
|
||||
home.file.".claude/skills/worktree-compare/SKILL.md".source = ./skills/worktree-compare/SKILL.md;
|
||||
home.file.".claude/skills/worktree-list/SKILL.md".source = ./skills/worktree-list/SKILL.md;
|
||||
|
||||
# Skills: agents (adapted from opencode)
|
||||
$DRY_RUN_CMD mkdir -p "$SKILLS_DIR"/{designer-bold,designer,analyze-branch,oracle,librarian}
|
||||
$DRY_RUN_CMD ln -sf ${./skills/designer-bold/SKILL.md} "$SKILLS_DIR/designer-bold/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/designer/SKILL.md} "$SKILLS_DIR/designer/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/analyze-branch/SKILL.md} "$SKILLS_DIR/analyze-branch/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/oracle/SKILL.md} "$SKILLS_DIR/oracle/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/librarian/SKILL.md} "$SKILLS_DIR/librarian/SKILL.md"
|
||||
|
||||
# Skills: knowledge (adapted from opencode)
|
||||
$DRY_RUN_CMD mkdir -p "$SKILLS_DIR"/{git-master,planning-with-files,react-patterns,vercel-react-best-practices}
|
||||
$DRY_RUN_CMD ln -sf ${./skills/git-master/SKILL.md} "$SKILLS_DIR/git-master/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/planning-with-files/SKILL.md} "$SKILLS_DIR/planning-with-files/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/react-patterns/SKILL.md} "$SKILLS_DIR/react-patterns/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/vercel-react-best-practices/SKILL.md} "$SKILLS_DIR/vercel-react-best-practices/SKILL.md"
|
||||
|
||||
# Skills: workflows (adapted from opencode)
|
||||
$DRY_RUN_CMD mkdir -p "$SKILLS_DIR"/{smart-debug,tdd-cycle,security-scan,issue,remove-deadcode,worktree-compare,worktree-list}
|
||||
$DRY_RUN_CMD ln -sf ${./skills/smart-debug/SKILL.md} "$SKILLS_DIR/smart-debug/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/tdd-cycle/SKILL.md} "$SKILLS_DIR/tdd-cycle/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/security-scan/SKILL.md} "$SKILLS_DIR/security-scan/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/issue/SKILL.md} "$SKILLS_DIR/issue/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/remove-deadcode/SKILL.md} "$SKILLS_DIR/remove-deadcode/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/worktree-compare/SKILL.md} "$SKILLS_DIR/worktree-compare/SKILL.md"
|
||||
$DRY_RUN_CMD ln -sf ${./skills/worktree-list/SKILL.md} "$SKILLS_DIR/worktree-list/SKILL.md"
|
||||
|
||||
# Copy settings.json to make it writable (only if it doesn't exist or is a symlink)
|
||||
if [ -L "$SETTINGS_FILE" ] || [ ! -f "$SETTINGS_FILE" ]; then
|
||||
$DRY_RUN_CMD rm -f "$SETTINGS_FILE"
|
||||
$DRY_RUN_CMD cp ${./settings.json} "$SETTINGS_FILE"
|
||||
$DRY_RUN_CMD chmod 644 "$SETTINGS_FILE"
|
||||
fi
|
||||
'';
|
||||
home.file.".claude/settings.json".source = ./settings.json;
|
||||
home.file.".claude/CLAUDE.md".source = ./CLAUDE.md;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"permissions": {
|
||||
"additionalDirectories": ["/home/naps62/projects", "/home/naps62/ethui"],
|
||||
"additionalDirectories": ["/home/naps62/projects", "/home/naps62/ethui", "/home/naps62/labs", "/home/naps62/subvisual"],
|
||||
"allow": [
|
||||
"Edit",
|
||||
"Write",
|
||||
@@ -29,31 +29,13 @@
|
||||
"Bash(kitty @ set-tab-title:*)"
|
||||
]
|
||||
},
|
||||
"sandbox": {
|
||||
"enabled": true,
|
||||
"autoAllowBashIfSandboxed": false
|
||||
},
|
||||
"defaultMode": "acceptEdits",
|
||||
"feedbackSurveyState": {
|
||||
"lastShownTime": 1754052643456
|
||||
},
|
||||
"hooks": {
|
||||
"Stop": [
|
||||
{
|
||||
"matcher": "*",
|
||||
"hooks": [{ "type": "command", "command": "printf '\\a'" }]
|
||||
}
|
||||
],
|
||||
"SessionStart": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "node \"/home/naps62/.claude/hooks/gsd-check-update.js\""
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "node \"/home/naps62/.claude/hooks/gsd-statusline.js\""
|
||||
}
|
||||
"$schema": "https://json.schemastore.org/claude-code-settings.json"
|
||||
}
|
||||
|
||||
@@ -42,6 +42,14 @@
|
||||
typstyle
|
||||
|
||||
renderdoc
|
||||
|
||||
mkcert
|
||||
nss.tools
|
||||
|
||||
# claude sandbox
|
||||
bubblewrap
|
||||
socat
|
||||
libseccomp
|
||||
];
|
||||
|
||||
programs.tmux = {
|
||||
|
||||
Reference in New Issue
Block a user