reo101
2941536b80
Also stop passing `outputs` around, prefer `inputs.self` Also put all `auto_` in `readOnly` `internal` options - `autoModules`, `autoConfigurations` and `autoPackages` Do not export packages as overlay (causes an infinite recursion) - this is documented on the two places it has effect on -- in `./overlays/default.nix` and `./modules/flake/configurations.nix` -- in `autoConfigurations` we manually extend `pkgs` with the flake packages Allow packages to say what `systems` they are compatible with - See `./pkgs/swww/systems.nix` - disabled for all systems - See `./pkgs/pngpaste/systems.nix` - enabled only for `darwin` targets
30 lines
699 B
Nix
30 lines
699 B
Nix
{ inputs, lib, pkgs, config, ... }:
|
|
{
|
|
networking.firewall.allowedTCPPorts = [11434];
|
|
|
|
services.ollama = {
|
|
enable = true;
|
|
host = "0.0.0.0";
|
|
port = 11434;
|
|
acceleration = "rocm";
|
|
environmentVariables = {
|
|
OLLAMA_ORIGINS = "*";
|
|
};
|
|
};
|
|
|
|
services.open-webui = {
|
|
enable = true;
|
|
host = "0.0.0.0";
|
|
port = 3000;
|
|
environment = {
|
|
ANONYMIZED_TELEMETRY = "False";
|
|
DO_NOT_TRACK = "True";
|
|
SCARF_NO_ANALYTICS = "True";
|
|
TRANSFORMERS_CACHE = "${config.services.open-webui.stateDir}/cache";
|
|
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434";
|
|
# Disable authentication
|
|
WEBUI_AUTH = "False";
|
|
};
|
|
openFirewall = true;
|
|
};
|
|
}
|