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

@ -39,7 +39,6 @@
}@inputs: }@inputs:
let let
configuration_name = "h001"; configuration_name = "h001";
system = "x86_64-linux";
stateVersion = "24.11"; stateVersion = "24.11";
primaryUser = "luser"; primaryUser = "luser";
overlayIp = "100.64.0.13"; overlayIp = "100.64.0.13";
@ -49,7 +48,6 @@
nixosConfigurations = { nixosConfigurations = {
"${configuration_name}" = ( "${configuration_name}" = (
lib.nixosSystem { lib.nixosSystem {
inherit system;
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };

View file

@ -1,19 +1,20 @@
{ {
inputs, inputs,
pkgs,
... ...
}: }:
let let
declaration = "services/misc/litellm.nix"; declaration = "services/misc/litellm.nix";
nixpkgs = inputs.litellm-nixpkgs; nixpkgsLitellm = inputs.litellm-nixpkgs;
pkgs = import nixpkgs { pkgsLitellm = import nixpkgsLitellm {
system = "x86_64-linux"; inherit (pkgs) system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
port = 8094; port = 8094;
in in
{ {
disabledModules = [ declaration ]; disabledModules = [ declaration ];
imports = [ "${nixpkgs}/nixos/modules/${declaration}" ]; imports = [ "${nixpkgsLitellm}/nixos/modules/${declaration}" ];
options = { }; options = { };
config = { config = {
networking.firewall.enable = true; networking.firewall.enable = true;
@ -25,7 +26,7 @@ in
inherit port; inherit port;
host = "0.0.0.0"; host = "0.0.0.0";
openFirewall = false; openFirewall = false;
package = pkgs.litellm; package = pkgsLitellm.litellm;
environment = { environment = {
SCARF_NO_ANALYTICS = "True"; SCARF_NO_ANALYTICS = "True";
DO_NOT_TRACK = "True"; DO_NOT_TRACK = "True";
@ -50,11 +51,11 @@ in
litellm_params = { litellm_params = {
model = "github_copilot/${m}"; model = "github_copilot/${m}";
extra_headers = { extra_headers = {
editor-version = "vscode/${pkgs.vscode.version}"; editor-version = "vscode/${pkgsLitellm.vscode.version}";
editor-plugin-version = "copilot/${pkgs.vscode-extensions.github.copilot.version}"; editor-plugin-version = "copilot/${pkgsLitellm.vscode-extensions.github.copilot.version}";
Copilot-Integration-Id = "vscode-chat"; Copilot-Integration-Id = "vscode-chat";
Copilot-Vision-Request = "true"; 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"; 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-5.1-2025-11-13"
"gpt-4o-2024-05-13" "gpt-4o-2024-05-13"

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -28,7 +28,6 @@
}@inputs: }@inputs:
let let
configuration_name = "o001"; configuration_name = "o001";
system = "aarch64-linux";
stateVersion = "23.11"; stateVersion = "23.11";
primaryUser = "root"; primaryUser = "root";
overlayIp = "100.64.0.11"; overlayIp = "100.64.0.11";
@ -41,12 +40,14 @@
"-i" "-i"
"/run/agenix/nix2oracle" "/run/agenix/nix2oracle"
]; ];
nodes.${configuration_name} = { nodes.${configuration_name} = rec {
hostname = "64.181.210.7"; hostname = "64.181.210.7";
targetPlatform = system; targetPlatform = "aarch64-linux";
profiles.system = { profiles.system = {
user = "root"; user = "root";
path = deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.${configuration_name}; path =
deploy-rs.lib.${targetPlatform}.activate.nixos
self.nixosConfigurations.${configuration_name};
}; };
}; };
}; };