From 10bc61746e77b2df7711a1c70608e41567ea13dc Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 16 Jan 2025 14:47:07 -0600 Subject: [PATCH] fix llm module --- modules/llm/default.nix | 19 ++----------------- pkgs/default.nix | 3 +-- pkgs/llm/llm-with-plugins/default.nix | 2 +- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/modules/llm/default.nix b/modules/llm/default.nix index b0175e9..6052b01 100644 --- a/modules/llm/default.nix +++ b/modules/llm/default.nix @@ -1,25 +1,10 @@ { - pkgs, config, - mkOizysModule, flake, + mkOizysModule, ... }: -let - selfPackages = (flake.pkgs "self"); - pyWithLlm = ( - pkgs.python3.withPackages (_: [ - selfPackages.llm - selfPackages.llm-claude-3 - ]) - ); - llm-with-plugins = ( - pkgs.writeShellScriptBin "llm" '' - exec ${pyWithLlm}/bin/llm "$@" - '' - ); -in mkOizysModule config "llm" { - environment.systemPackages = [ llm-with-plugins ]; + environment.systemPackages = [ (flake.pkgs "self").llm-with-plugins ]; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 3456a48..420dc9c 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,6 +6,5 @@ distrobox = pkgs.callPackage ./distrobox { }; - llm-with-plugins = pkgs.callPackage ./llm/llm-with-plugins {}; + llm-with-plugins = pkgs.callPackage ./llm/llm-with-plugins { }; } - diff --git a/pkgs/llm/llm-with-plugins/default.nix b/pkgs/llm/llm-with-plugins/default.nix index 4e93188..000c971 100644 --- a/pkgs/llm/llm-with-plugins/default.nix +++ b/pkgs/llm/llm-with-plugins/default.nix @@ -5,7 +5,7 @@ let inherit (pkgs) python3Packages; llm = python3Packages.callPackage ../llm { }; - llm-claude-3 = python3Packages.callPackage ../llm-plugins/llm-claude-3 { }; + llm-claude-3 = python3Packages.callPackage ../llm-claude-3 { }; pyWithLlm = ( pkgs.python3.withPackages (_: [