mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-03 07:31:03 +01:00
ollama: add darwin support
This commit is contained in:
parent
8c0671c513
commit
daf04c5950
8 changed files with 75 additions and 3 deletions
24
tests/modules/services/ollama/darwin/basic.nix
Normal file
24
tests/modules/services/ollama/darwin/basic.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
lib.mkMerge [
|
||||
{
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
host = "localhost";
|
||||
port = 11111;
|
||||
environmentVariables = {
|
||||
OLLAMA_LLM_LIBRARY = "cpu";
|
||||
HIP_VISIBLE_DEVICES = "0,1";
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.ollama = { };
|
||||
}
|
||||
(lib.mkIf pkgs.stdenv.isDarwin {
|
||||
nmt.script = ''
|
||||
serviceFile=LaunchAgents/org.nix-community.home.ollama.plist
|
||||
assertFileExists "$serviceFile"
|
||||
assertFileContent "$serviceFile" ${./expected-agent.plist}
|
||||
'';
|
||||
})
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue