1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 23:51:03 +01:00

ollama: add darwin support

This commit is contained in:
Ivan Kovnatsky 2025-01-25 01:54:49 +02:00 committed by GitHub
parent 8c0671c513
commit daf04c5950
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 75 additions and 3 deletions

View file

@ -0,0 +1,22 @@
{
config = {
services.ollama = {
enable = true;
host = "localhost";
port = 11111;
environmentVariables = {
OLLAMA_LLM_LIBRARY = "cpu";
HIP_VISIBLE_DEVICES = "0,1";
};
};
test.stubs.ollama = { };
nmt.script = ''
serviceFile="home-files/.config/systemd/user/ollama.service"
assertFileRegex "$serviceFile" 'Environment=OLLAMA_HOST=localhost:11111'
assertFileRegex "$serviceFile" 'Environment=OLLAMA_LLM_LIBRARY=cpu'
assertFileRegex "$serviceFile" 'Environment=HIP_VISIBLE_DEVICES=0,1'
'';
};
}