From 58ae27d6d13b1b7a5ab32720742230ed5df9d462 Mon Sep 17 00:00:00 2001 From: iofq Date: Thu, 26 Feb 2026 21:58:32 -0600 Subject: [PATCH] init llm tooling --- flake.lock | 109 ++++++++++++++++++++++++++-- flake.nix | 5 +- home-manager/shared/programs/pi.nix | 11 +++ pkgs/default.nix | 6 +- 4 files changed, 119 insertions(+), 12 deletions(-) create mode 100644 home-manager/shared/programs/pi.nix diff --git a/flake.lock b/flake.lock index 099f215..12109f4 100755 --- a/flake.lock +++ b/flake.lock @@ -1,9 +1,31 @@ { "nodes": { + "blueprint": { + "inputs": { + "nixpkgs": [ + "llm-agents", + "nixpkgs" + ], + "systems": "systems_2" + }, + "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" + } + }, "dart": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1771048667, @@ -225,7 +247,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1731533236, @@ -242,7 +264,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -430,6 +452,26 @@ "type": "github" } }, + "llm-agents": { + "inputs": { + "blueprint": "blueprint", + "nixpkgs": "nixpkgs_3", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1772162957, + "narHash": "sha256-CunGzQ1e2+bTgiLnuRSiwUsdN3RaRs1xy+ofYerwNVA=", + "owner": "numtide", + "repo": "llm-agents.nix", + "rev": "4167f8a37504786e80d1b32c907e403fe41ccd08", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "llm-agents.nix", + "type": "github" + } + }, "luvit-meta": { "flake": false, "locked": { @@ -667,6 +709,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1771423170, + "narHash": "sha256-K7Dg9TQ0mOcAtWTO/FX/FaprtWQ8BmEXTpLIaNRhEwU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bcc4a9d9533c033d806a46b37dc444f9b0da49dd", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1771008912, "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", @@ -682,7 +740,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1755660401, "owner": "NixOS", @@ -750,16 +808,17 @@ "determinate": "determinate", "home-manager": "home-manager", "jj-vine": "jj-vine", + "llm-agents": "llm-agents", "microvm": "microvm", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable", "nvim": "nvim", "pre-commit-hooks": "pre-commit-hooks", "sops-nix": "sops-nix", - "systems": "systems_4", - "treefmt-nix": "treefmt-nix" + "systems": "systems_5", + "treefmt-nix": "treefmt-nix_2" } }, "sops-nix": { @@ -858,7 +917,43 @@ "type": "github" } }, + "systems_5": { + "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": 1770228511, + "narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "337a4fe074be1042a35086f15481d763b8ddc0e7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index 3b6ec98..3405910 100755 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,7 @@ url = "github:abrenneke/jj-vine"; flake = false; }; + llm-agents.url = "github:numtide/llm-agents.nix"; }; outputs = { @@ -64,15 +65,15 @@ config.allowUnfree = true; overlays = [ inputs.nvim.overlays.default + inputs.llm-agents.overlays.default inputs.self.overlays.stable-packages - (import ./overlays { inherit inputs; }) ]; }; eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system}); treefmtEval = eachSystem (pkgs: inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix); in { - packages = eachSystem (pkgs: import ./pkgs { inherit inputs; }); + packages = eachSystem (pkgs: import ./pkgs { inherit inputs pkgs; }); overlays = import ./overlays { inherit inputs; }; formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); nixosConfigurations = import ./nixos { diff --git a/home-manager/shared/programs/pi.nix b/home-manager/shared/programs/pi.nix new file mode 100644 index 0000000..8a2b8d5 --- /dev/null +++ b/home-manager/shared/programs/pi.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: +{ + home.packages = with pkgs; [ + pi + ]; + + home.file."${config.xdg.configHome}/.pi" = { + source = ./config; + recursive = true; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 7402840..d610953 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,9 +1,9 @@ -{ inputs, ... }: -pkgs: { +{ inputs, pkgs, ... }: +{ jj-vine = pkgs.rustPlatform.buildRustPackage { name = "jj-vine"; src = inputs.jj-vine; cargoHash = "sha256-OU3WVLXGsMwpfzDM4sXa4KTGps63MTDvDAE/HREzPS8="; - nativeBuildInputs = [ pkgs.jj ]; + nativeBuildInputs = [ pkgs.jujutsu ]; }; }