From 6112653d9555ec0cd57f69f99a6e098ccbe5fee0 Mon Sep 17 00:00:00 2001 From: Rei Meliesie Date: Wed, 23 Sep 2026 13:25:10 +0200 Subject: [PATCH] Generate Claude JSON config from Nix expression --- ruysch.nix | 66 ++++++++++++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 37 deletions(-) diff --git a/ruysch.nix b/ruysch.nix index 3b9c5f2..a3a8ccd 100644 --- a/ruysch.nix +++ b/ruysch.nix @@ -124,47 +124,39 @@ "/var/lib/postgresql" ]; - etc."claude/settings.json".text = lib.concatStringsSep "\n" [ - "{" - + etc."claude/settings.json".source = (pkgs.formats.json {}).generate "claude-config" { # 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" - }, - '' - + 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(git push *)" + "Bash(git commit *)" + ]; + disableBypassPermissionsMode = "disable"; + }; + # Personal config. - '' - "disableAutoMode": "disable", - "env": { - "CLAUDE_CODE_ENABLE_AWAY_SUMMARY": "0", - "CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION": "false" - } - '' - - "}" - ]; + disableAutoMode = "disable"; + env = { + CLAUDE_CODE_ENABLE_AWAY_SUMMARY = 0; + CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION = "false"; + }; + }; }; services = {