diff --git a/modules/llm/default.nix b/modules/llm/default.nix index 16979a3..b0175e9 100644 --- a/modules/llm/default.nix +++ b/modules/llm/default.nix @@ -6,14 +6,20 @@ ... }: +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 = with pkgs; [ - (python3.withPackages (ps: - with (flake.pkgs "self"); - [ - llm - llm-claude-3 - ] - )) - ]; + environment.systemPackages = [ llm-with-plugins ]; }