pin all leading edge apps to their own nixpkgs so they can update independently

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-10-07 19:22:43 -05:00
parent b89d0a67fa
commit 3a0b2e754d
8 changed files with 431 additions and 315 deletions

View file

@ -1,20 +1,19 @@
{
upkgs,
inputs,
config,
...
}:
let
declaration = "services/misc/open-webui.nix";
nixpkgs = inputs.open-webui-nixpkgs;
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
in
{
# Use unstable services
disabledModules = [
"services/misc/open-webui.nix"
"services/misc/litellm.nix"
];
imports = [
"${inputs.nixpkgs-unstable}/nixos/modules/services/misc/open-webui.nix"
"${inputs.nixpkgs-unstable}/nixos/modules/services/misc/litellm.nix"
];
disabledModules = [ declaration ];
imports = [ "${nixpkgs}/nixos/modules/${declaration}" ];
options = { };
config = {
services.nginx.virtualHosts."chat.joshuabell.xyz" = {
@ -35,7 +34,7 @@
port = 8084;
host = "127.0.0.1";
openFirewall = false;
package = upkgs.open-webui;
package = pkgs.open-webui;
environmentFile = config.age.secrets.openwebui_env.path;
environment = {
# Declarative config, we don't use admin panel for anything
@ -68,134 +67,5 @@
# OAUTH_UPDATE_PICTURE_ON_LOGIN = "True";
};
};
services.litellm = {
enable = true;
port = 8094;
openFirewall = false;
package = upkgs.litellm;
environment = {
SCARF_NO_ANALYTICS = "True";
DO_NOT_TRACK = "True";
ANONYMIZED_TELEMETRY = "False";
GITHUB_COPILOT_TOKEN_DIR = "/var/lib/litellm/github_copilot";
XDG_CONFIG_HOME = "/var/lib/litellm/.config";
};
settings = {
model_list = [
# existing
{
model_name = "GPT-5";
litellm_params = {
model = "azure/gpt-5-2025-08-07";
api_base = "http://100.64.0.8:9010/azure";
api_version = "2025-04-01-preview";
api_key = "na";
};
}
{
model_name = "GPT-5-mini";
litellm_params = {
model = "azure/gpt-5-mini-2025-08-07";
api_base = "http://100.64.0.8:9010/azure";
api_version = "2025-04-01-preview";
api_key = "na";
};
}
{
model_name = "GPT-5-nano";
litellm_params = {
model = "azure/gpt-5-nano-2025-08-07";
api_base = "http://100.64.0.8:9010/azure";
api_version = "2025-04-01-preview";
api_key = "na";
};
}
# {
# model_name = "GPT-5-codex";
# litellm_params = {
# model = "azure/gpt-5-codex-2025-09-15";
# api_base = "http://100.64.0.8:9010/azure";
# api_version = "2025-04-01-preview";
# api_key = "na";
# };
# }
{
model_name = "GPT-4.1";
litellm_params = {
model = "azure/gpt-4.1-2025-04-14";
api_base = "http://100.64.0.8:9010/azure";
api_version = "2025-04-01-preview";
api_key = "na";
};
}
{
model_name = "GPT-4.1-mini";
litellm_params = {
model = "azure/gpt-4.1-mini-2025-04-14";
api_base = "http://100.64.0.8:9010/azure";
api_version = "2025-04-01-preview";
api_key = "na";
};
}
{
model_name = "GPT-4o";
litellm_params = {
model = "azure/gpt-4o-2024-05-13";
api_base = "http://100.64.0.8:9010/azure";
api_version = "2025-04-01-preview";
api_key = "na";
};
}
# {
# model_name = "dall-e-3-3.0";
# litellm_params = {
# model = "azure/dall-e-3-3.0";
# api_base = "http://100.64.0.8:9010/azure";
# api_version = "2025-04-01-preview";
# api_key = "na";
# };
# }
# Copilot
{
model_name = "copilot-claude-sonnet-4";
litellm_params = {
model = "github_copilot/claude-sonnet-4";
extra_headers = {
"editor-version" = "vscode/1.85.1";
"Copilot-Integration-Id" = "vscode-chat";
"user-agent" = "GithubCopilot/1.155.0";
"editor-plugin-version" = "copilot/1.155.0";
};
};
}
{
model_name = "copilot-google-gemini-2.5-pro";
litellm_params = {
model = "github_copilot/gemini-2.5-pro";
extra_headers = {
"editor-version" = "vscode/1.85.1";
"Copilot-Integration-Id" = "vscode-chat";
"user-agent" = "GithubCopilot/1.155.0";
"editor-plugin-version" = "copilot/1.155.0";
};
};
}
# {
# model_name = "copilot-google-gemini-2.0-flash";
# litellm_params = {
# model = "github_copilot/gemini-2.0-flash";
# extra_headers = {
# "editor-version" = "vscode/1.85.1";
# "Copilot-Integration-Id" = "vscode-chat";
# "user-agent" = "GithubCopilot/1.155.0";
# "editor-plugin-version" = "copilot/1.155.0";
# };
# };
# }
];
};
};
};
}