llama-cpp: fix model name
All checks were successful
Build and Deploy / deploy (push) Successful in 1m18s

This commit is contained in:
2026-04-06 00:59:20 -04:00
parent bbcd662c28
commit 0e4f0d3176

View File

@@ -9,13 +9,15 @@
}: }:
let let
cfg = config.services.llama-cpp; 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 in
{ {
services.llama-cpp = { services.llama-cpp = {
enable = true; enable = true;
model = toString ( model = toString (
pkgs.fetchurl { 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="; sha256 = "sha256-4bxEJwn+eAqksuybIsFqf83/VC8X8B7Q4yAxFNKPnzQ=";
} }
); );
@@ -36,6 +38,8 @@ in
"--api-key-file" "--api-key-file"
config.age.secrets.llama-cpp-api-key.path config.age.secrets.llama-cpp-api-key.path
"--metrics" "--metrics"
"--alias"
modelAlias
]; ];
}; };