mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 07:08:45 +08:00
18 lines
592 B
Nix
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 ];
|
|
};
|
|
}
|