mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-29 15:49:16 -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;
|
|
};
|
|
};
|
|
}
|