Ollama on stargate
This commit is contained in:
parent
11bcac1297
commit
53ed61892c
3 changed files with 35 additions and 4 deletions
|
|
@ -31,6 +31,11 @@ in {
|
||||||
Search for models of your choice from: <https://ollama.com/library>
|
Search for models of your choice from: <https://ollama.com/library>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
home = mkOpt path (
|
||||||
|
if impermanence.enable
|
||||||
|
then "${persist}/ollama"
|
||||||
|
else "/var/lib/ollama"
|
||||||
|
) "Path to data folder";
|
||||||
ui.enable = mkBoolOpt true "Enable openwebui at localhost:8080";
|
ui.enable = mkBoolOpt true "Enable openwebui at localhost:8080";
|
||||||
ui.port = mkOption {
|
ui.port = mkOption {
|
||||||
type = types.port;
|
type = types.port;
|
||||||
|
|
@ -49,10 +54,8 @@ in {
|
||||||
if nvidia.enable
|
if nvidia.enable
|
||||||
then "cuda"
|
then "cuda"
|
||||||
else null;
|
else null;
|
||||||
home =
|
home = cfg.home;
|
||||||
if impermanence.enable
|
|
||||||
then "${persist}/ollama"
|
|
||||||
else "/var/lib/ollama";
|
|
||||||
user = "ollama";
|
user = "ollama";
|
||||||
group = "ollama";
|
group = "ollama";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,14 @@ in {
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"chat.kylekrein.com" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://${config.services.open-webui.host}:${builtins.toString config.services.open-webui.port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
"smart-home.kylekrein.com" = {
|
"smart-home.kylekrein.com" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
|
||||||
20
systems/x86_64-linux/stargate/services/ollama.nix
Normal file
20
systems/x86_64-linux/stargate/services/ollama.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
loadModels = ["qwq" "llama3.1" "qwen2.5-coder:7b" "gpt-oss:20b"];
|
||||||
|
acceleration = null;
|
||||||
|
user = "ollama";
|
||||||
|
group = "ollama";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.open-webui = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = false;
|
||||||
|
port = 7009;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue