1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00
home-manager/tests/modules/services/local-ai/enabled-with-environment.nix
Austin Horstman d9cd40d2da
local-ai: string -> str (#8116)
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-11-03 04:41:08 +00:00

18 lines
774 B
Nix

{
services.local-ai = {
enable = true;
environment = {
MODELS_PATH = "/tmp/models";
PRELOAD_MODELS = "[{ \"url\": \"https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_K_M.gguf\", \"name\": \"mistral-7b-instruct-v0.2.Q4_K_M.gguf\" }]";
};
};
nmt.script = ''
assertFileContains \
home-files/.config/systemd/user/local-ai.service \
"Environment=MODELS_PATH=/tmp/models"
assertFileContains \
home-files/.config/systemd/user/local-ai.service \
"Environment=PRELOAD_MODELS=[{ \"url\": \"https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q4_K_M.gguf\", \"name\": \"mistral-7b-instruct-v0.2.Q4_K_M.gguf\" }]"
'';
}