mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-17 10:35:13 -05:00
feat: init
This commit is contained in:
commit
c19ea940bd
320 changed files with 23845 additions and 0 deletions
40
nixos/modules/ollama-main.nix
Executable file
40
nixos/modules/ollama-main.nix
Executable file
|
@ -0,0 +1,40 @@
|
|||
{flake, ...}: let
|
||||
inherit (flake.config.system.device) wildcard;
|
||||
inherit (flake.config.service.instance.ollama) paths ports name;
|
||||
localhost = wildcard.ip.address0;
|
||||
in {
|
||||
services = {
|
||||
ollama = {
|
||||
acceleration = false;
|
||||
enable = true;
|
||||
group = name;
|
||||
host = "http://${localhost}";
|
||||
models = paths.path1;
|
||||
user = name;
|
||||
};
|
||||
open-webui = {
|
||||
enable = true;
|
||||
host = localhost;
|
||||
port = ports.port0;
|
||||
environment = {
|
||||
ENABLE_OLLAMA_API = "True";
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
DO_NOT_TRACK = "True";
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
OLLAMA_BASE_URL = "http://${localhost}:${toString ports.port1}";
|
||||
WEBUI_AUTH = "True";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = ["Z ${paths.path1} 0755 ${name} ${name} -"];
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
ports.port0
|
||||
ports.port1
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue