nixos/slop-cannon: Fix Codex procfs fallback
Restore the bubblewrap diagnostic expected by Codex so its existing container fallback handles nspawn procfs restrictions. Verified workspace writes succeed and outside writes are denied. `check-system slop-cannon` passes.
This commit is contained in:
@@ -36,6 +36,15 @@ in
|
||||
agentUser = "slop-cannon";
|
||||
agentHome = "/home/${agentUser}";
|
||||
|
||||
# TODO: Drop once Codex recognises bubblewrap's newer `/proc` error wording.
|
||||
# Restore the diagnostic its procfs preflight expects so it uses its container fallback.
|
||||
codexBubblewrap = pkgs.bubblewrap.overrideAttrs (old: {
|
||||
postPatch = (old.postPatch or "") + ''
|
||||
substituteInPlace bubblewrap.c \
|
||||
--replace-fail "Can't mount proc on %s" "Can't mount proc on /newroot%s"
|
||||
'';
|
||||
});
|
||||
|
||||
# Steer agents to the approval broker; these match command text, so they aren't a boundary
|
||||
claudeDeny = [
|
||||
"Bash(deploy:*)"
|
||||
@@ -109,7 +118,7 @@ in
|
||||
home-manager.users.${agentUser} = {
|
||||
my.agents.enable = true;
|
||||
|
||||
home.packages = [ slopClone ];
|
||||
home.packages = [ slopClone codexBubblewrap ];
|
||||
|
||||
programs = {
|
||||
claude-code.settings.permissions = {
|
||||
|
||||
Reference in New Issue
Block a user