marvin: use llama-server's routing instead of llama-swap
1 file changed, 11 insertions(+), 19 deletions(-)
changed files
M user/hosts/marvin.nix → user/hosts/marvin.nix
@@ -5,12 +5,10 @@ lib, ... }: let - inherit (lib) removePrefix concatMapStringsSep isDerivation; + inherit (lib) removePrefix; nixfiles = config.home.homeDirectory + "/projects/alin.ovh/nixfiles"; direct_symlink = path: config.lib.file.mkOutOfStoreSymlink "${nixfiles}/${removePrefix "/" path}"; - - makeDrvBinPath = ps: concatMapStringsSep ":" (p: if isDerivation p then "${p}/bin" else p) ps; in { imports = [@@ -89,33 +87,27 @@ OLLAMA_CONTEXT_LENGTH = "131072"; }; }; }; - llama-swap = { + llama-server = { enable = true; config = { ProgramArguments = [ - "${pkgs.llama-swap}/bin/llama-swap" - "--listen" - "0.0.0.0:9292" - "--config" - "${config.xdg.configHome}/llama-swap/config.yaml" - "--watch-config" + "${pkgs.llama-cpp}/bin/llama-server" + "--port" + "9090" + "--models-preset" + "${config.xdg.configHome}/llama/presets.ini" ]; RunAtLoad = true; KeepAlive = true; WorkingDirectory = "/Users/alan"; - StandardOutPath = "/Users/alan/Library/Logs/llama-swap.log"; - StandardErrorPath = "/Users/alan/Library/Logs/llama-swap.log"; - EnvironmentVariables = { - PATH = makeDrvBinPath [ - pkgs.llama-cpp - ]; - }; + StandardOutPath = "/Users/alan/Library/Logs/llama-server.log"; + StandardErrorPath = "/Users/alan/Library/Logs/llama-server.log"; }; }; }; - xdg.configFile."llama-swap/config.yaml" = { - source = direct_symlink "/user/settings/llama/swap.yaml"; + xdg.configFile."llama/presets.ini" = { + source = direct_symlink "/user/settings/llama/presets.ini"; }; xdg.configFile."raycast/ai/providers.yaml" = {