flake/modules/nixos/services/ollama.nix
2025-10-19 14:49:27 +03:00

43 lines
889 B
Nix

{
lib,
config,
...
}:
{
options = {
osbmModules = {
enableOllama = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable Ollama services.";
};
};
};
config = lib.mkMerge [
(lib.mkIf config.osbmModules.enableOllama {
services.ollama = {
enable = true;
acceleration = "cuda";
# loadModels = [
# "deepseek-r1:7b"
# "deepseek-r1:14b"
# ];
};
services.open-webui = {
enable = false; # TODO gives error fix later
port = 7070;
host = "0.0.0.0";
openFirewall = true;
environment = {
SCARF_NO_ANALYTICS = "True";
DO_NOT_TRACK = "True";
ANONYMIZED_TELEMETRY = "False";
WEBUI_AUTH = "False";
ENABLE_LOGIN_FORM = "False";
};
};
})
];
}