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