summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2026-06-04 14:33:17 -0400
committerBen Sima <ben@bensima.com>2026-06-04 14:33:17 -0400
commit2792e1e667ba25ea37890b1d51f1f25525e331a2 (patch)
tree4b562592ae0da9f70db6e46c5d9dd8bc4653744f /flake.nix
parent12dd309b8e334eaf19eae6d9eb9bb85024457b8a (diff)
Replace agentd with one-shot agent
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix31
1 files changed, 25 insertions, 6 deletions
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;
+ };
};
}