mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-22 21:38:44 +08:00
services.ollama: init
This commit is contained in:
parent
135df14fff
commit
426077c296
1
.webui_secret_key
Normal file
1
.webui_secret_key
Normal file
@ -0,0 +1 @@
|
||||
1c2lE/E3swpYeU8F
|
@ -146,6 +146,7 @@ inputs:
|
||||
memoryMB = 90112;
|
||||
gpus."4060" = 1;
|
||||
};
|
||||
ollama = {};
|
||||
};
|
||||
bugs = [ "xmunet" "backlight" "amdpstate" ];
|
||||
};
|
||||
|
16
modules/services/ollama.nix
Normal file
16
modules/services/ollama.nix
Normal file
@ -0,0 +1,16 @@
|
||||
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;
|
||||
};
|
||||
nixos.packages._packages = [ inputs.pkgs.oterm ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user