opencode: use AI flake input with home-manager module

- Remove vendor/AI git submodule, use github:srid/AI flake input
- Import AI's opencode home-manager module for autoWire
- Set OPENCODE_DISABLE_CLAUDE_CODE=1
This commit is contained in:
Sridhar Ratnakumar 2026-03-13 20:46:29 -04:00
parent 192623d3eb
commit f5f8c89006
5 changed files with 22 additions and 15 deletions

3
.gitmodules vendored
View file

@ -1,6 +1,3 @@
[submodule "vendor/jumphost-nix"]
path = vendor/jumphost-nix
url = https://github.com/srid/jumphost-nix.git
[submodule "vendor/AI"]
path = vendor/AI
url = https://github.com/srid/AI.git

17
flake.lock generated
View file

@ -1,16 +1,19 @@
{
"nodes": {
"AI": {
"flake": false,
"locked": {
"path": "vendor/AI",
"type": "path"
"lastModified": 1773449106,
"narHash": "sha256-F7VJ5JJ+GL8GVVZvaH9bGnviG/qLww7iDCQAUwFzHqE=",
"owner": "srid",
"repo": "AI",
"rev": "b771ccada0ec4b19b6e38c101bac95026e6d2434",
"type": "github"
},
"original": {
"path": "vendor/AI",
"type": "path"
},
"parent": []
"owner": "srid",
"repo": "AI",
"type": "github"
}
},
"aeson-typescript": {
"flake": false,

View file

@ -34,8 +34,7 @@
oc.url = "github:juspay/oc";
# landrun-nix.url = "github:srid/landrun-nix";
landrun-nix.url = "github:adrian-gierakowski/landrun-nix/darwin-implementation-via-sandbox-exec";
AI.url = "path:vendor/AI";
AI.flake = false;
AI.url = "github:srid/AI";
jumphost-nix.url = "path:vendor/jumphost-nix";
jumphost-nix.flake = false;

View file

@ -1,12 +1,21 @@
{ config, flake, pkgs, ... }:
{
imports = [ flake.inputs.oc.homeModules.default ];
programs.opencode.package = flake.inputs.oc.packages.${pkgs.stdenv.hostPlatform.system}.default;
imports = [
flake.inputs.oc.homeModules.default
flake.inputs.AI.homeManagerModules.opencode
];
programs.opencode = {
package = flake.inputs.oc.packages.${pkgs.stdenv.hostPlatform.system}.default;
autoWire.dir = flake.inputs.AI;
};
programs.zsh.initContent = ''
export JUSPAY_API_KEY="$(cat "${config.age.secrets.juspay-anthropic-api-key.path}")"
export OPENCODE_DISABLE_CLAUDE_CODE=1
'';
programs.bash.initExtra = ''
export JUSPAY_API_KEY="$(cat "${config.age.secrets.juspay-anthropic-api-key.path}")"
export OPENCODE_DISABLE_CLAUDE_CODE=1
'';
}

1
vendor/AI vendored

@ -1 +0,0 @@
Subproject commit 2f02c943cae209118ac501bb759df5ce09e13e09