diff --git a/flake.lock b/flake.lock index 204b3a5..07d21d4 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,39 @@ "type": "github" } }, + "bun2nix": { + "inputs": { + "flake-parts": [ + "llm-agents", + "flake-parts" + ], + "nixpkgs": [ + "llm-agents", + "nixpkgs" + ], + "systems": [ + "llm-agents", + "systems" + ], + "treefmt-nix": [ + "llm-agents", + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1784665499, + "narHash": "sha256-9BMxlTxCCDAeoNLtb1a/st7udtTIJep+wpUzquA29VU=", + "owner": "nix-community", + "repo": "bun2nix", + "rev": "0f2a1f0b6f42cebe3b149bf62d38754c5e0e9729", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "bun2nix", + "type": "github" + } + }, "determinate": { "inputs": { "determinate-nixd-aarch64-darwin": "determinate-nixd-aarch64-darwin", @@ -116,6 +149,27 @@ "url": "https://flakehub.com/f/hercules-ci/flake-parts/0.1" } }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "llm-agents", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1787559586, + "narHash": "sha256-onL0VLf9vPllmT0H/OlURIU5r5t5WIEl7t4tVNKT0Nw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9d0d87172c374f89da73c1cfe6d81ae62feac1f1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "fonts": { "flake": false, "locked": { @@ -199,6 +253,30 @@ "type": "github" } }, + "llm-agents": { + "inputs": { + "bun2nix": "bun2nix", + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1788173616, + "narHash": "sha256-x/B/7TqgY44sZtp61hyVh6qUf4u8k/jRqN6zowV/BtU=", + "owner": "numtide", + "repo": "llm-agents.nix", + "rev": "f55ce77d0c5a84f80b86a81e7b8231f10e17aa99", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "llm-agents.nix", + "type": "github" + } + }, "nix": { "inputs": { "flake-parts": "flake-parts", @@ -322,6 +400,7 @@ "determinate": "determinate", "fonts": "fonts", "home-manager": "home-manager_2", + "llm-agents": "llm-agents", "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs_3", "skills-impeccable": "skills-impeccable", @@ -393,6 +472,42 @@ "repo": "mutant", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "llm-agents", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1786901030, + "narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index f809ca9..81a814f 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + llm-agents = { + url = "github:numtide/llm-agents.nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # Agent skill sources — content repos, not flakes. Pinned in flake.lock; # `nix flake update skills-*` to bump. Consumed by modules/skills.nix. skills-mattpocock = { diff --git a/lib/mk-home.nix b/lib/mk-home.nix index a6b34b0..094aea6 100644 --- a/lib/mk-home.nix +++ b/lib/mk-home.nix @@ -16,6 +16,7 @@ home-manager.lib.homeManagerConfiguration { pkgs = import nixpkgs { inherit system; config.allowUnfreePredicate = allowUnfreePred; + overlays = [ inputs.llm-agents.overlays.shared-nixpkgs ]; }; extraSpecialArgs = { username = user; diff --git a/modules/claude.nix b/modules/claude.nix index 77f5e40..d033b6c 100644 --- a/modules/claude.nix +++ b/modules/claude.nix @@ -30,8 +30,10 @@ in { imports = [ ./agents.nix ]; - # Claude Code CLI from nixpkgs; shared module so both host and VM can run it. - programs.claude-code.enable = true; + programs.claude-code = { + enable = true; + package = pkgs.llm-agents.claude-code; + }; # Out-of-store: Claude Code rewrites settings.json at runtime, so edits land # straight in the working copy. The rest of ~/.claude is runtime state, unmanaged. diff --git a/modules/pi.nix b/modules/pi.nix index 9234ba9..bb246f7 100644 --- a/modules/pi.nix +++ b/modules/pi.nix @@ -5,6 +5,7 @@ programs.pi-coding-agent = { enable = true; + package = pkgs.llm-agents.pi; extraPackages = [ pkgs.nodejs ]; };