diff --git a/flake.lock b/flake.lock index f675ae1..787b853 100644 --- a/flake.lock +++ b/flake.lock @@ -845,11 +845,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1773585334, - "narHash": "sha256-GJV6Bm/C1+3cq2L0uK0dE7F6EB6dz5N/H1GuOiwadtc=", + "lastModified": 1773767390, + "narHash": "sha256-8REVos3V8hBDF/j4vB4KPRP5rIQd2ukxkdrXYrlPrIg=", "owner": "numtide", "repo": "llm-agents.nix", - "rev": "0aa0a9a068beb125b148bf47ac45daf266dd0af3", + "rev": "7509c7ed545ea3b5f11f8ed8a7efa7591157c9c8", "type": "github" }, "original": { @@ -1165,11 +1165,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1773507054, - "narHash": "sha256-Q8U5VXgrcxmCxPtCCJCIZkcAX3FCZwGh1GNVIXxMND0=", + "lastModified": 1773597492, + "narHash": "sha256-hQ284SkIeNaeyud+LS0WVLX+WL2rxcVZLFEaK0e03zg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e80236013dc8b77aa49ca90e7a12d86f5d8d64c9", + "rev": "a07d4ce6bee67d7c838a8a5796e75dff9caa21ef", "type": "github" }, "original": { @@ -1226,20 +1226,20 @@ "oc", "llm-agents", "nixpkgs" - ], - "skills": "skills" + ] }, "locked": { - "lastModified": 1773700387, - "narHash": "sha256-R2mtpLngeEpw/k9dfHDlVWvOafKzpv1IYdOSkhc9OXs=", + "lastModified": 1773867526, + "narHash": "sha256-4vNEVBwV5g3nFO6J1jrsSSO+LG+SkIMKlX029CQB8Jg=", "owner": "juspay", - "repo": "oc", - "rev": "caa44925471b88a65e0656f2e0eaa77566de8fdf", + "repo": "AI", + "rev": "6dbf82666b78cf33d52bb5d4d0751f04dbf1c52e", "type": "github" }, "original": { "owner": "juspay", - "repo": "oc", + "ref": "claude2", + "repo": "AI", "type": "github" } }, @@ -1311,7 +1311,7 @@ "nixpkgs": "nixpkgs_4", "nixvim": "nixvim", "oc": "oc", - "skills": "skills_2", + "skills": "skills", "vira": "vira" } }, @@ -1392,22 +1392,6 @@ "type": "github" } }, - "skills_2": { - "flake": false, - "locked": { - "lastModified": 1773698966, - "narHash": "sha256-xinR7KBkwXAIgFJ0/E1Rr6nsqjpvUhFHz5XPJRlqyDA=", - "owner": "juspay", - "repo": "skills", - "rev": "cea10416d9029844d8f8c6ea939f211d6fa16835", - "type": "github" - }, - "original": { - "owner": "juspay", - "repo": "skills", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index 45ffaac..7582886 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,7 @@ nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; # vira.url = "github:juspay/vira/github"; vira.url = "github:juspay/vira"; - oc.url = "github:juspay/oc"; + oc.url = "github:juspay/AI/claude2"; # landrun-nix.url = "github:srid/landrun-nix"; landrun-nix.url = "github:adrian-gierakowski/landrun-nix/darwin-implementation-via-sandbox-exec"; nix-agent-wire.url = "github:srid/nix-agent-wire"; diff --git a/modules/home/opencode/default.nix b/modules/home/opencode/default.nix index 5da3ac2..5a3fd69 100644 --- a/modules/home/opencode/default.nix +++ b/modules/home/opencode/default.nix @@ -1,29 +1,25 @@ -{ config, flake, pkgs, ... }: -let - inherit (flake) self; -in +{ flake, pkgs, ... }: { imports = [ - flake.inputs.oc.homeModules.default - flake.inputs.nix-agent-wire.homeModules.opencode + flake.inputs.oc.homeModules.opencode ]; - age.secrets.juspay-anthropic-api-key.file = self + /secrets/juspay-anthropic-api-key.age; - programs.opencode = { package = flake.inputs.oc.packages.${pkgs.stdenv.hostPlatform.system}.opencode; autoWire.dirs = [ flake.inputs.skills.outPath (flake.self.outPath + "/AI") ]; + settings = { + model = "anthropic/claude-opus-4-6/max"; + }; }; + # Prevent opencode from delegating to Claude Code when it's installed 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 ''; } diff --git a/modules/home/opencode/juspay.nix b/modules/home/opencode/juspay.nix new file mode 100644 index 0000000..c290d49 --- /dev/null +++ b/modules/home/opencode/juspay.nix @@ -0,0 +1,16 @@ +# Juspay LLM provider for opencode (via grid.ai.juspay.net) +# Import this module alongside ./default.nix to use Juspay models. +{ config, flake, ... }: +let + inherit (flake) self; +in +{ + age.secrets.juspay-anthropic-api-key.file = self + /secrets/juspay-anthropic-api-key.age; + + programs.zsh.initContent = '' + export JUSPAY_API_KEY="$(cat "${config.age.secrets.juspay-anthropic-api-key.path}")" + ''; + programs.bash.initExtra = '' + export JUSPAY_API_KEY="$(cat "${config.age.secrets.juspay-anthropic-api-key.path}")" + ''; +}