mirror of
https://codeberg.org/muon/home.git
synced 2025-12-05 23:57:46 +00:00
38 lines
820 B
Nix
38 lines
820 B
Nix
{ pkgs, lib, config, ... }:
|
|
let
|
|
cfg = config.mods.server.chat;
|
|
port = config.mods.server.nginx.ports.chat;
|
|
in with lib; {
|
|
options.mods.server = {
|
|
chat = {
|
|
enable = mkEnableOption {
|
|
default = false;
|
|
description = "enables ollama server";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.ollama = {
|
|
enable = true;
|
|
loadModels = [ "deepseek-r1:1.5b" "deepseek-r1:7b" "deepseek-r1:8b" ];
|
|
|
|
};
|
|
|
|
services.open-webui = {
|
|
enable = true;
|
|
host = "0.0.0.0";
|
|
|
|
environment = {
|
|
ANONYMIZED_TELEMETRY = "False";
|
|
DO_NOT_TRACK = "True";
|
|
SCARF_NO_ANALYTICS = "True";
|
|
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434";
|
|
# Disable authentication
|
|
# WEBUI_AUTH = "False";
|
|
};
|
|
|
|
inherit port;
|
|
};
|
|
};
|
|
}
|