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 ]; };