greenhouse

kore

my public infrastructure monorepo

git clone [email protected]:kore.git

feat(home/feats/cli): switch from claude-code to opencode

commitb16d5a74d2d74f4f7cbc65e4f4b1321a7e7d1425
parent26734082496696dfecc8a8213813acc3f3fb4834
authorlostduk <[email protected]>
date2026-03-02 06:20 +0000
home/features/cli/claude.nix27---------------------------
home/features/cli/opencode.nix25+++++++++++++++++++++++++
home/profiles/sunflower.nix2+-
nixos/roles/workstation.nix13+++++++++----

4 files changed, -32/+35

home/features/cli/claude.nix

@@ -1,27 +0,0 @@-{-  programs.claude-code = {-    enable = true;-    settings = {-      theme = "dark";-      env = {-        # Fuck Anthorpic-        DISABLE_TELEMETRY = true;-        DISABLE_ERROR_REPORTING = true;-        DISABLE_BUG_COMMAND = true;-        CLAUDE_CODE_ENABLE_TELEMETRY = false;-        CLAUDE_CODE_DISABLE_FEEDBACK_SURVERY = true;-        CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = true;-      };-      permissions = {-        ask = [ "Edit" ];-        deny = [-          "WebFetch"-          "Bash(curl:*)"-          "Bash(git:*)"-          "Read(./.env)"-        ];-      };-      includeCoAuthoredBy = false;-    };-  };-}

home/features/cli/opencode.nix

@@ -0,0 +1,25 @@+{+  programs.opencode = {+    enable = true;+    web.enable = false;++    settings = {+      # go fuck ur self+      formatter = {+        disabled = true;+      };+      permission = {+        webfetch = "ask";+        read = {+          "*.env" = "deny";+          "*.env.*" = "deny";+          "*.env.example" = "allow";+        };+        bash = {+          "curl *" = "deny";+          "git *" = "deny";+        };+      };+    };+  };+}

home/profiles/sunflower.nix

@@ -6,7 +6,7 @@     ../features/cli/nvim.nix     ../features/cli/bash.nix     ../features/cli/tmux.nix-    ../features/cli/claude.nix+    ../features/cli/opencode.nix      ../features/misc/xdg.nix   ];

nixos/roles/workstation.nix

@@ -15,10 +15,6 @@ in {       users.lostduk = outputs.homeConfigurations.${config.networking.hostName};     }; -    nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [-      "claude-code"-    ];-     systemd.services.wipe-trash = {       restartIfChanged = false;       wantedBy = [ "multi-user.target" ];@@ -26,11 +22,20 @@ in {         Type = "oneshot";         RemainAfterExit = true;         ExecStart = pkgs.writeShellScript "" ''+          set -e+           find '/home/lostduk' -mindepth 1 -maxdepth 1 \             ! -name 'documents' \             ! -name '.gnupg' \             ! -name '.password-store' \+            ! -name '.config' \             -exec rm -r {} +++          if [ -d /home/lostduk/.config ]; then+            find /home/lostduk/.config -mindepth 1 -maxdepth 1 \+              ! -name 'opencode' \+              -exec rm -r {} ++          fi         '';       };     };