From 910b9f322d5284850da8e6ffa566885198368147 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Tue, 31 Mar 2026 19:25:21 +0800 Subject: [PATCH] feat: install ai agents via llm-agents.nix --- flake.lock | 181 +++++++++++++++++++++++++++++++++++- flake.nix | 8 +- home/base/gui/dev-tools.nix | 8 +- 3 files changed, 187 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 743c1e3e..77ac22cc 100644 --- a/flake.lock +++ b/flake.lock @@ -67,6 +67,65 @@ "type": "github" } }, + "blueprint": { + "inputs": { + "nixpkgs": [ + "llm-agents", + "nixpkgs" + ], + "systems": [ + "llm-agents", + "systems" + ] + }, + "locked": { + "lastModified": 1771437256, + "narHash": "sha256-bLqwib+rtyBRRVBWhMuBXPCL/OThfokA+j6+uH7jDGU=", + "owner": "numtide", + "repo": "blueprint", + "rev": "06ee7190dc2620ea98af9eb225aa9627b68b0e33", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "blueprint", + "type": "github" + } + }, + "bun2nix": { + "inputs": { + "flake-parts": [ + "llm-agents", + "flake-parts" + ], + "import-tree": "import-tree", + "nixpkgs": [ + "llm-agents", + "nixpkgs" + ], + "systems": [ + "llm-agents", + "systems" + ], + "treefmt-nix": [ + "llm-agents", + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1770895533, + "narHash": "sha256-v3QaK9ugy9bN9RXDnjw0i2OifKmz2NnKM82agtqm/UY=", + "owner": "nix-community", + "repo": "bun2nix", + "rev": "c843f477b15f51151f8c6bcc886954699440a6e1", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "bun2nix", + "type": "github" + } + }, "catppuccin": { "inputs": { "nixpkgs": [ @@ -242,7 +301,10 @@ }, "flake-parts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib" + "nixpkgs-lib": [ + "llm-agents", + "nixpkgs" + ] }, "locked": { "lastModified": 1772408722, @@ -259,6 +321,24 @@ } }, "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nixpak", @@ -281,7 +361,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1681202837, @@ -539,6 +619,21 @@ "type": "github" } }, + "import-tree": { + "locked": { + "lastModified": 1763762820, + "narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=", + "owner": "vic", + "repo": "import-tree", + "rev": "3c23749d8013ec6daa1d7255057590e9ca726646", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, "lanzaboote": { "inputs": { "crane": "crane", @@ -563,6 +658,29 @@ "type": "github" } }, + "llm-agents": { + "inputs": { + "blueprint": "blueprint", + "bun2nix": "bun2nix", + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_4", + "systems": "systems_3", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1774947294, + "narHash": "sha256-HQCV6dQQJk+4Ogox1LXhIUMtaFUeVy72LzY3HLyO5sE=", + "owner": "numtide", + "repo": "llm-agents.nix", + "rev": "c16f7573405eec513a201b4626aabcd1444a7382", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "llm-agents.nix", + "type": "github" + } + }, "my-asahi-firmware": { "flake": false, "locked": { @@ -619,7 +737,7 @@ }, "nix-gaming": { "inputs": { - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "nixpkgs": [ "nixpkgs" @@ -698,7 +816,7 @@ }, "nixpak": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "hercules-ci-effects": "hercules-ci-effects", "nixpkgs": [ "nixpkgs" @@ -859,6 +977,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1774855581, + "narHash": "sha256-YkreHeMgTCYvJ5fESV0YyqQK49bHGe2B51tH6claUh4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "15c6719d8c604779cf59e03c245ea61d3d7ab69b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1773821835, "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", @@ -1003,6 +1137,7 @@ "helix": "helix", "home-manager": "home-manager_3", "lanzaboote": "lanzaboote", + "llm-agents": "llm-agents", "my-asahi-firmware": "my-asahi-firmware", "mysecrets": "mysecrets", "nix-darwin": "nix-darwin", @@ -1010,7 +1145,7 @@ "nixos-apple-silicon": "nixos-apple-silicon", "nixos-generators": "nixos-generators", "nixpak": "nixpak", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-2505": "nixpkgs-2505", "nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-master": "nixpkgs-master", @@ -1152,6 +1287,42 @@ "type": "github" } }, + "systems_4": { + "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": 1773297127, + "narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "71b125cd05fbfd78cab3e070b73544abe24c5016", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "wallpapers": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index b5aea1ab..2052cb78 100644 --- a/flake.nix +++ b/flake.nix @@ -16,11 +16,13 @@ nixConfig = { # substituers will be appended to the default substituters when fetching packages extra-substituters = [ + "https://cache.numtide.com" # "https://nix-gaming.cachix.org" # "https://nixpkgs-wayland.cachix.org" # "https://install.determinate.systems" ]; extra-trusted-public-keys = [ + "niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g=" # "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" # "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" # "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" @@ -142,6 +144,9 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # AI coding agents + llm-agents.url = "github:numtide/llm-agents.nix"; + # -------------- Gaming --------------------- nix-gaming = { @@ -184,8 +189,5 @@ url = "github:ryan4yin/nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; }; - - # for waydroid - # nur-ataraxiasjel.url = "github:AtaraxiaSjel/nur"; }; } diff --git a/home/base/gui/dev-tools.nix b/home/base/gui/dev-tools.nix index 94b91281..7c199b0e 100644 --- a/home/base/gui/dev-tools.nix +++ b/home/base/gui/dev-tools.nix @@ -1,4 +1,4 @@ -{ pkgs, pkgs-master, ... }: +{ pkgs, llm-agents, ... }: { home.packages = with pkgs; @@ -7,11 +7,15 @@ wireshark # network analyzer ] # AI Agent Tools - ++ (with pkgs-master; [ + ++ (with llm-agents.packages.${pkgs.stdenv.hostPlatform.system}; [ + # Agents codex cursor-cli claude-code gemini-cli opencode + + # Utilities + rtk # CLI proxy that reduces LLM token consumption ]); }