mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 13:03:56 -05:00
20 lines
403 B
Nix
20 lines
403 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
config = lib.mkIf config.ar.services.ollama.enable {
|
|
services.ollama = {
|
|
enable = true;
|
|
acceleration =
|
|
if config.ar.services.ollama.gpu == "amd"
|
|
then "rocm"
|
|
else if config.ar.services.ollama.gpu == "nvidia"
|
|
then "cuda"
|
|
else null;
|
|
listenAddress = config.ar.services.ollama.listenAddress;
|
|
};
|
|
};
|
|
}
|