oizys/modules/llm/default.nix

26 lines
414 B
Nix
Raw Normal View History

2024-08-08 13:53:51 -05:00
{
pkgs,
config,
mkOizysModule,
flake,
2024-08-08 13:53:51 -05:00
...
}:
2024-11-07 15:19:21 -06:00
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
2024-08-08 13:53:51 -05:00
mkOizysModule config "llm" {
2024-11-07 15:19:21 -06:00
environment.systemPackages = [ llm-with-plugins ];
2024-08-08 13:53:51 -05:00
}