1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-10 10:47:02 +00:00
home-manager/tests/modules/services/ollama/darwin/basic.nix
2025-01-25 00:54:49 +01:00

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