From 0e4f0d3176c561e1e8f3d65bcd0ac27f2fc91016 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Mon, 6 Apr 2026 00:59:20 -0400 Subject: [PATCH] llama-cpp: fix model name --- services/llama-cpp/llama-cpp.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/llama-cpp/llama-cpp.nix b/services/llama-cpp/llama-cpp.nix index 759dbfc..4a27929 100644 --- a/services/llama-cpp/llama-cpp.nix +++ b/services/llama-cpp/llama-cpp.nix @@ -9,13 +9,15 @@ }: let cfg = config.services.llama-cpp; + modelUrl = "https://huggingface.co/unsloth/gemma-4-E4B-it-GGUF/resolve/main/gemma-4-E4B-it-Q4_K_M.gguf"; + modelAlias = lib.removeSuffix ".gguf" (builtins.baseNameOf modelUrl); in { services.llama-cpp = { enable = true; model = toString ( pkgs.fetchurl { - url = "https://huggingface.co/unsloth/gemma-4-E4B-it-GGUF/resolve/main/gemma-4-E4B-it-Q4_K_M.gguf"; + url = modelUrl; sha256 = "sha256-4bxEJwn+eAqksuybIsFqf83/VC8X8B7Q4yAxFNKPnzQ="; } ); @@ -36,6 +38,8 @@ in "--api-key-file" config.age.secrets.llama-cpp-api-key.path "--metrics" + "--alias" + modelAlias ]; };