diff --git a/ruysch.nix b/ruysch.nix index 48b4bd4..3b9c5f2 100644 --- a/ruysch.nix +++ b/ruysch.nix @@ -123,6 +123,48 @@ "/var/lib/garage" "/var/lib/postgresql" ]; + + etc."claude/settings.json".text = lib.concatStringsSep "\n" [ + "{" + + # Required by TandemDrive security policy. + + '' + "permissions": { + "deny": [ + "Read(.env)", + "Read(.env.*)", + "Read(~/.ssh/**)", + "Read(~/.gnupg/**)", + "Read(~/.config/**)", + "Read(~/Documents/**)", + "Bash(* | bash)", + "Bash(* | sh)", + "Bash(sudo *)", + "Bash(ssh *)", + "Bash(git push *)", + "Bash(git commit *)" + ], + "ask": [ + "Bash(curl *)", + "Bash(wget *)" + ], + "disableBypassPermissionsMode": "disable" + }, + '' + + # Personal config. + + '' + "disableAutoMode": "disable", + "env": { + "CLAUDE_CODE_ENABLE_AWAY_SUMMARY": "0", + "CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "false" + } + '' + + "}" + ]; }; services = { @@ -207,6 +249,11 @@ redis.serviceConfig.RuntimeDirectoryMode = lib.mkForce "0755"; }; + systemd.user.tmpfiles.rules = [ + # TODO: Don't persist entire .claude directory. + "L /home/rei/.claude/settings.json - - - - /etc/claude/settings.json" + ]; + systemd.tmpfiles.rules = [ "L+ /tmp/.s.PGSQL.5432 - - - - /run/postgresql/.s.PGSQL.5432" ];