diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 75796ba..3246b1e 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -12,5 +12,9 @@ "Bash(done)", "Bash(TUICR_TERMINAL=kitty /home/naps62/.claude/skills/tuicr/tuicr-wrapper.sh:*)" ] + }, + "sandbox": { + "enabled": true, + "autoAllowBashIfSandboxed": false } } diff --git a/flake.lock b/flake.lock index 171758d..0cda7de 100644 --- a/flake.lock +++ b/flake.lock @@ -613,11 +613,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1770353257, - "narHash": "sha256-on4vg7ctpMPzKWcvXPtV095aal6KUPDSKV9+I8HhQtY=", + "lastModified": 1770707140, + "narHash": "sha256-3ZRA2+o5p1+FKWx988WbwB1SQ2Mz5aL95zxhL5iD+O0=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "6242228ddf448e775b3dd8f2b7a78c3856e70d52", + "rev": "db14437f8667f7f09784e2a4e73c105bdc1c7023", "type": "github" }, "original": { diff --git a/home/common/programs/claude/default.nix b/home/common/programs/claude/default.nix index e312e45..1df0289 100644 --- a/home/common/programs/claude/default.nix +++ b/home/common/programs/claude/default.nix @@ -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; } diff --git a/home/common/programs/claude/settings.json b/home/common/programs/claude/settings.json index c701d8b..b847028 100644 --- a/home/common/programs/claude/settings.json +++ b/home/common/programs/claude/settings.json @@ -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" } diff --git a/home/common/programs/dev.nix b/home/common/programs/dev.nix index 6fdf943..79dd03e 100644 --- a/home/common/programs/dev.nix +++ b/home/common/programs/dev.nix @@ -42,6 +42,14 @@ typstyle renderdoc + + mkcert + nss.tools + + # claude sandbox + bubblewrap + socat + libseccomp ]; programs.tmux = {