mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-10 10:47:02 +00:00
24 lines
524 B
Nix
24 lines
524 B
Nix
{ 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}
|
|
'';
|
|
})
|
|
]
|