nixos/modules/services/ollama.nix
2024-07-29 22:05:11 +08:00

18 lines
592 B
Nix

inputs:
{
options.nixos.services.ollama = let inherit (inputs.lib) mkOption types; in mkOption
{ type = types.nullOr (types.submodule {}); default = null; };
config = let inherit (inputs.config.nixos.services) ollama; in inputs.lib.mkIf (ollama != null)
{
services =
{
ollama.enable = true;
open-webui =
{ enable = true; package = inputs.pkgs.genericPackages.open-webui; environment.WEBUI_AUTH = "False"; };
nextjs-ollama-llm-ui.enable = true;
};
# TODO: broken in python 3.12
# nixos.packages._packages = [ inputs.pkgs.oterm ];
};
}