From 2792e1e667ba25ea37890b1d51f1f25525e331a2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 4 Jun 2026 14:33:17 -0400 Subject: Replace agentd with one-shot agent --- flake.nix | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 7a028d0..843f9c5 100644 --- a/flake.nix +++ b/flake.nix @@ -3,9 +3,13 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + agentd = { + url = "git+file:///home/ben/src/bsima/agentd"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs }: + outputs = { self, nixpkgs, agentd }: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -16,19 +20,34 @@ ps.openai ps.requests ]); + + agent = pkgs.rustPlatform.buildRustPackage { + pname = "agent"; + version = "0.1.0"; + src = agentd; + cargoLock.lockFile = "${agentd}/Cargo.lock"; + cargoBuildFlags = [ "-p" "agent" ]; + doCheck = false; + }; in { devShells.${system}.default = pkgs.mkShell { - buildInputs = [ pythonEnv ]; + buildInputs = [ pythonEnv agent ]; shellHook = '' echo "slopbot dev shell ready" echo "Run: python main.py" ''; }; - packages.${system}.default = pkgs.writeShellScriptBin "slopbot" '' - cd /home/ben/src/bsima/slopbot - exec ${pythonEnv}/bin/python ${./main.py} - ''; + packages.${system} = rec { + default = slopbot; + slopbot = pkgs.writeShellScriptBin "slopbot" '' + cd /home/ben/src/bsima/slopbot + export PATH=${agent}/bin:$PATH + export SLOPBOT_AGENT=${agent}/bin/agent + exec ${pythonEnv}/bin/python ${./main.py} + ''; + inherit agent; + }; }; } -- cgit v1.2.3