summaryrefslogtreecommitdiff
path: root/hostnix/mojo/flake.nix
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2026-04-13 12:58:29 -0400
committerJoe Mou <dev@mou.fo>2026-04-13 14:54:30 -0400
commit0106d074d5ac0124d161c9e04afc917b882f5ed0 (patch)
treede72e53c25a599c27baf5799f1f1457a9a1ca50a /hostnix/mojo/flake.nix
parent35275b3122128c3373b66d975fe0ab012e129d95 (diff)
mojo: Claude Code sandbox-exec wrapper
From https://github.com/neko-kai/claude-code-sandbox
Diffstat (limited to 'hostnix/mojo/flake.nix')
-rw-r--r--hostnix/mojo/flake.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/hostnix/mojo/flake.nix b/hostnix/mojo/flake.nix
index 87e3c8d..78584e4 100644
--- a/hostnix/mojo/flake.nix
+++ b/hostnix/mojo/flake.nix
@@ -19,7 +19,15 @@
};
in
[
- pkgsUnstable.claude-code
+ (pkgs.writeShellScriptBin "claude" ''
+ exec /usr/bin/sandbox-exec -f ${self}/claude.sb \
+ -D TARGET_DIR=$HOME/src \
+ -D TMP_DIR=/tmp \
+ -D HOME_DIR=$HOME \
+ -D CACHE_DIR=$HOME/.cache \
+ ${pkgsUnstable.claude-code}/bin/claude \
+ --allow-dangerously-skip-permissions "$@"
+ '')
pkgsUnstable.jujutsu
];