diff --git a/machines/nixos/x86_64-linux/jeeves/configuration.nix b/machines/nixos/x86_64-linux/jeeves/configuration.nix index 0c42ed1..6e06a4f 100644 --- a/machines/nixos/x86_64-linux/jeeves/configuration.nix +++ b/machines/nixos/x86_64-linux/jeeves/configuration.nix @@ -12,6 +12,7 @@ ./mindustry.nix ./home-assistant ./samba.nix + ./ollama.nix ]; age.rekey = { diff --git a/machines/nixos/x86_64-linux/jeeves/ollama.nix b/machines/nixos/x86_64-linux/jeeves/ollama.nix new file mode 100644 index 0000000..2c4dff7 --- /dev/null +++ b/machines/nixos/x86_64-linux/jeeves/ollama.nix @@ -0,0 +1,30 @@ +{ inputs, outputs, lib, pkgs, config, ... }: +{ + networking.firewall.allowedTCPPorts = [11434]; + + services.ollama = { + enable = true; + host = "0.0.0.0"; + port = 11434; + acceleration = "rocm"; + environmentVariables = { + OLLAMA_ORIGINS = "*"; + }; + }; + + services.open-webui = { + enable = true; + host = "0.0.0.0"; + port = 3000; + environment = { + ANONYMIZED_TELEMETRY = "False"; + DO_NOT_TRACK = "True"; + SCARF_NO_ANALYTICS = "True"; + TRANSFORMERS_CACHE = "${config.services.open-webui.stateDir}/cache"; + OLLAMA_API_BASE_URL = "http://127.0.0.1:11434"; + # Disable authentication + WEBUI_AUTH = "False"; + }; + openFirewall = true; + }; +}