34 lines
869 B
Nix
34 lines
869 B
Nix
{ lib, config, ... }:
|
|
{
|
|
options.ai.enable = lib.mkEnableOption "enable ai services";
|
|
config = lib.mkIf config.ai.enable {
|
|
fileSystems."/mnt/priv" = {
|
|
device = "192.168.50.240:/mnt/tank/Private";
|
|
fsType = "nfs";
|
|
options = [ "defaults" ];
|
|
};
|
|
|
|
services.gatus.settings.endpoints = [
|
|
{
|
|
name = "open-webui";
|
|
group = "local";
|
|
url = "http://0.0.0.0:${config.services.open-webui.port}/System/Ping";
|
|
interval = "5m";
|
|
# conditions = [''[BODY] == "Jellyfin Server"'']; # TODO:
|
|
}
|
|
];
|
|
|
|
services = {
|
|
ollama = {
|
|
enable = true;
|
|
# Optional: preload models, see https://ollama.com/library
|
|
loadModels = [ "llama3.2:3b" "deepseek-r1:1.5b"];
|
|
};
|
|
open-webui = {
|
|
enable = true;
|
|
port = 2333;
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
};
|
|
}
|