nixos-config/services/llm.nix

37 lines
712 B
Nix
Raw Permalink Normal View History

2025-02-13 23:21:21 +01:00
{
config,
inputs,
pkgs,
2025-12-09 21:49:29 +01:00
lib,
2025-02-13 23:21:21 +01:00
...
}:
{
2025-02-13 23:21:21 +01:00
disabledModules = [
"services/misc/ollama.nix"
"services/misc/open-webui.nix"
];
imports = [
"${inputs.nixpkgs-unstable}/nixos/modules/services/misc/ollama.nix"
"${inputs.nixpkgs-unstable}/nixos/modules/services/misc/open-webui.nix"
];
services.ollama = {
enable = true;
2025-12-09 21:49:29 +01:00
package = lib.mkDefault pkgs.unstable.ollama-vulkan;
host = "0.0.0.0";
2025-02-13 23:21:21 +01:00
};
services.open-webui = {
enable = true;
package = pkgs.unstable.open-webui;
2025-02-13 23:21:21 +01:00
host = "0.0.0.0";
port = 11111;
2025-02-13 23:21:21 +01:00
environment = {
WEBUI_AUTH = "False";
OLLAMA_API_BASE_URL = "http://127.0.0.1:${toString config.services.ollama.port}";
};
};
}