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

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";
@ -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}";
};
};

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

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";

View file

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