remove bad system usage

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-12-04 18:39:35 -06:00
parent 274d59ce4b
commit 457c53203d
8 changed files with 49 additions and 44 deletions

View file

@ -1,19 +1,20 @@
{
inputs,
pkgs,
...
}:
let
declaration = "services/misc/litellm.nix";
nixpkgs = inputs.litellm-nixpkgs;
pkgs = import nixpkgs {
system = "x86_64-linux";
nixpkgsLitellm = inputs.litellm-nixpkgs;
pkgsLitellm = import nixpkgsLitellm {
inherit (pkgs) system;
config.allowUnfree = true;
};
port = 8094;
in
{
disabledModules = [ declaration ];
imports = [ "${nixpkgs}/nixos/modules/${declaration}" ];
imports = [ "${nixpkgsLitellm}/nixos/modules/${declaration}" ];
options = { };
config = {
networking.firewall.enable = true;
@ -25,7 +26,7 @@ in
inherit port;
host = "0.0.0.0";
openFirewall = false;
package = pkgs.litellm;
package = pkgsLitellm.litellm;
environment = {
SCARF_NO_ANALYTICS = "True";
DO_NOT_TRACK = "True";
@ -33,7 +34,7 @@ in
GITHUB_COPILOT_TOKEN_DIR = "/var/lib/litellm/github_copilot";
XDG_CONFIG_HOME = "/var/lib/litellm/.config";
};
settings = {
settings = {
environment_variables = {
LITELLM_PROXY_API_KEY = "na";
};
@ -50,11 +51,11 @@ in
litellm_params = {
model = "github_copilot/${m}";
extra_headers = {
editor-version = "vscode/${pkgs.vscode.version}";
editor-plugin-version = "copilot/${pkgs.vscode-extensions.github.copilot.version}";
editor-version = "vscode/${pkgsLitellm.vscode.version}";
editor-plugin-version = "copilot/${pkgsLitellm.vscode-extensions.github.copilot.version}";
Copilot-Integration-Id = "vscode-chat";
Copilot-Vision-Request = "true";
user-agent = "GithubCopilot/${pkgs.vscode-extensions.github.copilot.version}";
user-agent = "GithubCopilot/${pkgsLitellm.vscode-extensions.github.copilot.version}";
};
};
@ -80,7 +81,7 @@ in
api_key = "na";
};
})
# curl -L "http://100.64.0.8:9010/azure/openai/models?api-version=2025-04-01-preview" | jq '.data.[].id'
# curl -L "http://100.64.0.8:9010/azure/openai/models?api-version=2025-04-01-preview" | jq '.data.[].id'
[
"gpt-5.1-2025-11-13"
"gpt-4o-2024-05-13"

View file

@ -1,21 +1,22 @@
{
inputs,
pkgs,
...
}:
let
declaration = "services/monitoring/beszel-hub.nix";
nixpkgs = inputs.beszel-nixpkgs;
pkgs = import nixpkgs {
system = "x86_64-linux";
nixpkgsBeszel = inputs.beszel-nixpkgs;
pkgsBeszel = import nixpkgsBeszel {
inherit (pkgs) system;
config.allowUnfree = true;
};
in
{
disabledModules = [ declaration ];
imports = [ "${nixpkgs}/nixos/modules/${declaration}" ];
imports = [ "${nixpkgsBeszel}/nixos/modules/${declaration}" ];
config = {
services.beszel.hub = {
package = pkgs.beszel;
package = pkgsBeszel.beszel;
enable = true;
port = 8090;
host = "100.64.0.13";

View file

@ -1,14 +1,15 @@
{
inputs,
config,
pkgs,
lib,
...
}:
let
declaration = "services/security/oauth2-proxy.nix";
nixpkgs = inputs.oauth2-proxy-nixpkgs;
pkgs = import nixpkgs {
system = "x86_64-linux";
nixpkgsOauth2Proxy = inputs.oauth2-proxy-nixpkgs;
pkgsOauth2Proxy = import nixpkgsOauth2Proxy {
inherit (pkgs) system;
config.allowUnfree = true;
};
hasSecret =
@ -20,12 +21,12 @@ let
in
{
disabledModules = [ declaration ];
imports = [ "${nixpkgs}/nixos/modules/${declaration}" ];
imports = [ "${nixpkgsOauth2Proxy}/nixos/modules/${declaration}" ];
config = lib.mkIf (hasSecret "oauth2_proxy_key_file") {
services.oauth2-proxy = {
enable = true;
httpAddress = "http://127.0.0.1:4180";
package = pkgs.oauth2-proxy;
package = pkgsOauth2Proxy.oauth2-proxy;
provider = "oidc";
reverseProxy = true;
redirectURL = "https://sso-proxy.joshuabell.xyz/oauth2/callback";

View file

@ -1,14 +1,15 @@
{
inputs,
config,
pkgs,
lib,
...
}:
let
declaration = "services/misc/open-webui.nix";
nixpkgs = inputs.open-webui-nixpkgs;
pkgs = import nixpkgs {
system = "x86_64-linux";
nixpkgsOpenWebui = inputs.open-webui-nixpkgs;
pkgsOpenWebui = import nixpkgsOpenWebui {
inherit (pkgs) system;
config.allowUnfree = true;
};
hasSecret =
@ -20,7 +21,7 @@ let
in
{
disabledModules = [ declaration ];
imports = [ "${nixpkgs}/nixos/modules/${declaration}" ];
imports = [ "${nixpkgsOpenWebui}/nixos/modules/${declaration}" ];
options = { };
config = lib.mkIf (hasSecret "openwebui_env") {
services.nginx.virtualHosts."chat.joshuabell.xyz" = {
@ -44,7 +45,7 @@ in
port = 8084;
host = "127.0.0.1";
openFirewall = false;
package = pkgs.open-webui;
package = pkgsOpenWebui.open-webui;
environmentFile = config.age.secrets.openwebui_env.path;
environment = {
# Declarative config, we don't use admin panel for anything
@ -76,11 +77,11 @@ in
# OAUTH_PICTURE_CLAIM = "picture";
# OAUTH_UPDATE_PICTURE_ON_LOGIN = "True";
BYPASS_MODEL_ACCESS_CONTROL="True";
BYPASS_MODEL_ACCESS_CONTROL = "True";
# Other settings
CHAT_STREAM_RESPONSE_CHUNK_MAX_BUFFER_SIZE="10485760";
REPLACE_IMAGE_URLS_IN_CHAT_RESPONSE="True";
CHAT_STREAM_RESPONSE_CHUNK_MAX_BUFFER_SIZE = "10485760";
REPLACE_IMAGE_URLS_IN_CHAT_RESPONSE = "True";
};
};
};

View file

@ -1,22 +1,23 @@
{
lib,
inputs,
pkgs,
...
}:
let
declaration = "services/misc/pinchflat.nix";
nixpkgs = inputs.pinchflat-nixpkgs;
pkgs = import nixpkgs {
system = "x86_64-linux";
nixpkgsPinchflat = inputs.pinchflat-nixpkgs;
pkgsPinchflat = import nixpkgsPinchflat {
inherit (pkgs) system;
config.allowUnfree = true;
};
in
{
disabledModules = [ declaration ];
imports = [ "${nixpkgs}/nixos/modules/${declaration}" ];
imports = [ "${nixpkgsPinchflat}/nixos/modules/${declaration}" ];
config = {
services.pinchflat = {
package = pkgs.pinchflat;
package = pkgsPinchflat.pinchflat;
enable = true;
port = 8945;
selfhosted = true;

View file

@ -1,22 +1,23 @@
{
inputs,
pkgs,
...
}:
let
declaration = "services/web-apps/trilium.nix";
nixpkgs = inputs.trilium-nixpkgs;
pkgs = import nixpkgs {
system = "x86_64-linux";
nixpkgsTrilium = inputs.trilium-nixpkgs;
pkgsTrilium = import nixpkgsTrilium {
inherit (pkgs) system;
config.allowUnfree = true;
};
in
{
disabledModules = [ declaration ];
imports = [ "${nixpkgs}/nixos/modules/${declaration}" ];
imports = [ "${nixpkgsTrilium}/nixos/modules/${declaration}" ];
config = {
services.trilium-server = {
enable = true;
package = pkgs.trilium-server;
package = pkgsTrilium.trilium-server;
port = 9111;
host = "127.0.0.1";
dataDir = "/var/lib/trilium";