This commit is contained in:
mjallen18
2026-02-04 20:40:34 -06:00
parent 4d4808490b
commit a9c1d71495
14 changed files with 84 additions and 192 deletions

View File

@@ -226,7 +226,10 @@ rec {
subdomain = mkOpt types.str name "subdomain of the service"; subdomain = mkOpt types.str name "subdomain of the service";
middlewares = mkOpt (types.listOf types.str) [ "crowdsec" "whitelist-geoblock" ] "List of middlewares to use"; middlewares = mkOpt (types.listOf types.str) [
"crowdsec"
"whitelist-geoblock"
] "List of middlewares to use";
}; };
# Standard enable/disable patterns # Standard enable/disable patterns

View File

@@ -286,8 +286,10 @@ in
++ (with pkgs.${namespace}; [ ++ (with pkgs.${namespace}; [
gehomesdk gehomesdk
magicattr magicattr
pyoverseerr
python-nanokvm python-nanokvm
python-roborock python-roborock
wyzeapy
]); ]);
config = { config = {

View File

@@ -85,7 +85,7 @@ let
services.caddy = { services.caddy = {
enable = true; enable = true;
package = caddyPackage; package = caddyPackage;
environmentFile = config.sops.templates."caddy.env".path; environmentFile = config.sops.templates."caddy.env".path;
email = "jalle008@proton.me"; email = "jalle008@proton.me";
enableReload = false; enableReload = false;
dataDir = "${cfg.configDir}/caddy"; dataDir = "${cfg.configDir}/caddy";

View File

@@ -8,46 +8,6 @@ with lib;
let let
cfg = config.${namespace}.services.traefik; cfg = config.${namespace}.services.traefik;
# Process extraServices into service configurations
extraServiceConfigs =
let
makeService =
service:
nameValuePair service.name {
loadBalancer.servers = [
{
url = service.url;
}
];
};
in
listToAttrs (map makeService cfg.extraServices);
# Process extraRouters into router configurations
extraRouterConfigs =
let
makeRouter =
router:
let
hostRule =
if router.subdomain == "" then
"Host(`${domain}`)"
else
"Host(`${router.subdomain}.${domain}`)";
in
nameValuePair router.subdomain {
entryPoints = router.entryPoints;
rule = hostRule;
service = router.service;
middlewares = router.middlewares ++ [
"crowdsec"
"whitelist-geoblock"
];
tls.certResolver = "letsencrypt";
};
in
listToAttrs (map makeRouter cfg.extraRouters);
# Process reverseProxies into service and router configurations # Process reverseProxies into service and router configurations
reverseProxyServiceConfigs = reverseProxyServiceConfigs =
let let
@@ -69,7 +29,6 @@ let
cacheUrl = "http://${serverIp}:9012"; cacheUrl = "http://${serverIp}:9012";
hassUrl = "http://10.0.1.4:8123"; hassUrl = "http://10.0.1.4:8123";
lubeloggerUrl = "http://${serverIp}:6754";
# Plugins # Plugins
traefikPlugins = { traefikPlugins = {
@@ -230,9 +189,11 @@ in
}; };
}; };
api.dashboard = true; # Access the Traefik dashboard on <Traefik IP>:8080
# Access the Traefik dashboard on <Traefik IP>:8080 of your server api = {
api.insecure = true; dashboard = true;
insecure = true;
};
experimental = { experimental = {
plugins = traefikPlugins; plugins = traefikPlugins;
@@ -240,22 +201,6 @@ in
}; };
dynamicConfigOptions = { dynamicConfigOptions = {
# udp = {
# services = {
# wireguard.loadBalancer.servers = [
# {
# url = "localhost:51820";
# }
# ];
# };
# routers = {
# wireguard = {
# entryPoints = [ "websecure" ];
# service = "wireguard";
# };
# };
# };
http = { http = {
middlewares = { middlewares = {
authentik = { authentik = {
@@ -323,43 +268,6 @@ in
]; ];
}; };
}; };
collabora-headers = {
headers = {
customRequestHeaders = {
Upgrade = "websocket";
Connection = "Upgrade";
X-Forwarded-Proto = "https";
X-Forwarded-Host = "office.mjallen.dev";
};
customResponseHeaders = {
X-Frame-Options = "";
Content-Security-Policy = "frame-ancestors https://cloud.mjallen.dev";
};
referrerPolicy = "no-referrer";
stsSeconds = "15552000";
stsPreload = "true";
stsIncludeSubdomains = "true";
forceSTSHeader = "true";
browserXssFilter = "true";
};
};
onlyoffice-headers = {
headers = {
customResponseHeaders = {
X-Robots-Tag = "none";
Strict-Transport-Security = "max-age=63072000";
X-Forwarded-Proto = "https";
};
browserXssFilter = "true";
contentTypeNosniff = "true";
stsIncludeSubdomains = "true";
stsPreload = "true";
stsSeconds = "31536000";
forceSTSHeader = "true";
accessControlMaxAge = "15552000";
accesscontrolalloworiginlist = "*";
};
};
}; };
services = { services = {
@@ -381,7 +289,6 @@ in
} }
]; ];
} }
// extraServiceConfigs
// reverseProxyServiceConfigs; // reverseProxyServiceConfigs;
routers = { routers = {
@@ -413,13 +320,12 @@ in
middlewares = [ middlewares = [
"crowdsec" "crowdsec"
"whitelist-geoblock" "whitelist-geoblock"
"authentik" # "authentik"
]; ];
priority = 10; priority = 10;
tls.certResolver = "letsencrypt"; tls.certResolver = "letsencrypt";
}; };
} }
// extraRouterConfigs
// reverseProxyRouterConfigs; // reverseProxyRouterConfigs;
}; };
}; };

View File

@@ -1,6 +1,5 @@
{ {
lib, lib,
stdenv,
fetchFromGitHub, fetchFromGitHub,
python3Packages, python3Packages,
... ...
@@ -29,40 +28,38 @@ python3Packages.buildPythonPackage rec {
]; ];
dependencies = dependencies = with python3Packages; [
with python3Packages; aiohttp
[ torch
aiohttp torchaudio
torch torchvision
torchaudio numpy
torchvision requests
numpy
requests
torchsde torchsde
einops einops
transformers transformers
tokenizers tokenizers
sentencepiece sentencepiece
safetensors safetensors
aiohttp aiohttp
yarl yarl
pyyaml pyyaml
pillow pillow
scipy scipy
tqdm tqdm
psutil psutil
alembic alembic
sqlalchemy sqlalchemy
av av
requests requests
#non essential dependencies: #non essential dependencies:
kornia kornia
# spandrel # spandrel
pydantic pydantic
pydantic-settings pydantic-settings
]; ];
nativeCheckInputs = with python3Packages; [ nativeCheckInputs = with python3Packages; [
@@ -71,11 +68,10 @@ python3Packages.buildPythonPackage rec {
setupPhase = null; setupPhase = null;
# comfyui-frontend-package==1.37.11 # comfyui-frontend-package==1.37.11
# comfyui-workflow-templates==0.8.31 # comfyui-workflow-templates==0.8.31
# comfyui-embedded-docs==0.4.0 # comfyui-embedded-docs==0.4.0
# comfy-kitchen # comfy-kitchen
# comfy-aimdo # comfy-aimdo
# pythonImportsCheck = [ "roborock" ]; # pythonImportsCheck = [ "roborock" ];

View File

@@ -1,7 +1,6 @@
{ {
stdenv, stdenv,
lib, lib,
python3Packages,
fetchFromGitHub, fetchFromGitHub,
... ...
}: }:
@@ -26,17 +25,17 @@ stdenv.mkDerivation rec {
mkdir -p $out mkdir -p $out
cp -r $src $out cp -r $src $out
''; '';
# ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui # ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui
# ln -s $out/bin/comfy-ui $out/bin/comfyui # ln -s $out/bin/comfy-ui $out/bin/comfyui
passthru = { passthru = {
inherit inherit
# comfyuiSrc # comfyuiSrc
# pythonRuntime # pythonRuntime
# modelDownloaderDir # modelDownloaderDir
# frontendRoot # frontendRoot
# dependencies # dependencies
version version
; ;
}; };

View File

@@ -1,7 +1,6 @@
{ {
stdenv, stdenv,
lib, lib,
python3Packages,
fetchFromGitHub, fetchFromGitHub,
... ...
}: }:
@@ -26,17 +25,17 @@ stdenv.mkDerivation rec {
mkdir -p $out mkdir -p $out
cp -r $src $out cp -r $src $out
''; '';
# ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui # ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui
# ln -s $out/bin/comfy-ui $out/bin/comfyui # ln -s $out/bin/comfy-ui $out/bin/comfyui
passthru = { passthru = {
inherit inherit
# comfyuiSrc # comfyuiSrc
# pythonRuntime # pythonRuntime
# modelDownloaderDir # modelDownloaderDir
# frontendRoot # frontendRoot
# dependencies # dependencies
version version
; ;
}; };

View File

@@ -46,9 +46,7 @@ let
++ (with pkgs.${namespace}; [ ++ (with pkgs.${namespace}; [
comfy-aimdo comfy-aimdo
]); ]);
pythonEnv = python3.withPackages ( pythonEnv = python3.withPackages (_ps: dependencies);
_ps: dependencies
);
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "comfy-ui"; pname = "comfy-ui";
@@ -72,8 +70,8 @@ stdenv.mkDerivation rec {
ln -sf ${pythonEnv}/bin/python $out/bin/python ln -sf ${pythonEnv}/bin/python $out/bin/python
cp -r $src/* $out/app cp -r $src/* $out/app
''; '';
# ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui # ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui
# ln -s $out/bin/comfy-ui $out/bin/comfyui # ln -s $out/bin/comfy-ui $out/bin/comfyui
# passthru = { # passthru = {
# inherit # inherit

View File

@@ -1,9 +1,9 @@
{ python3Packages, fetchFromGitHub, lib, ... }: { python3Packages, fetchFromGitHub, ... }:
python3Packages.buildPythonPackage rec { python3Packages.buildPythonPackage rec {
pname = "comfy-aimdo"; pname = "comfy-aimdo";
version = "0.1.7"; version = "0.1.7";
format = "pyproject"; format = "pyproject";
# Comfy-Org/comfy-aimdo/releases/tag/v0.1.7 # Comfy-Org/comfy-aimdo/releases/tag/v0.1.7
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Comfy-Org"; owner = "Comfy-Org";
repo = "comfy-aimdo"; repo = "comfy-aimdo";

View File

@@ -1,9 +1,9 @@
{ python3Packages, fetchurl, lib, ... }: { python3Packages, fetchurl, ... }:
python3Packages.buildPythonPackage rec { python3Packages.buildPythonPackage rec {
pname = "comfy-kitchen"; pname = "comfy-kitchen";
version = "0.2.7"; version = "0.2.7";
format = "wheel"; format = "wheel";
# https://files.pythonhosted.org/packages/f8/65/d483613734d0b9753bd9bfa297ff334cb2c7766e82306099db6b259b4e2c/comfy_kitchen-0.2.7-py3-none-any.whl # https://files.pythonhosted.org/packages/f8/65/d483613734d0b9753bd9bfa297ff334cb2c7766e82306099db6b259b4e2c/comfy_kitchen-0.2.7-py3-none-any.whl
src = fetchurl { src = fetchurl {
url = "https://files.pythonhosted.org/packages/f8/65/d483613734d0b9753bd9bfa297ff334cb2c7766e82306099db6b259b4e2c/comfy_kitchen-0.2.7-py3-none-any.whl"; url = "https://files.pythonhosted.org/packages/f8/65/d483613734d0b9753bd9bfa297ff334cb2c7766e82306099db6b259b4e2c/comfy_kitchen-0.2.7-py3-none-any.whl";
sha256 = "sha256-+PqlebadMx0vHqwJ6WqVWGwqa5WKVLwZ5/HBp3hS3TY="; sha256 = "sha256-+PqlebadMx0vHqwJ6WqVWGwqa5WKVLwZ5/HBp3hS3TY=";

View File

@@ -5,8 +5,8 @@ admin_password: ENC[AES256_GCM,data:aGyn1Tm+2ld3BqXN3U1RQkew13Ln0Y3+xYiIUjErmq8Y
github-token: ENC[AES256_GCM,data:FAuwS/j5kd/NvOVdwa+ROWgMZCjyOjDbIMoU11KkaUOVhnztZyLGCA==,iv:+EvAvf7cUpljLHaxVkBRloZsAYcKjceJHinUU47PCRI=,tag:p0irO6vnt5nr4sZIq9B8gA==,type:str] github-token: ENC[AES256_GCM,data:FAuwS/j5kd/NvOVdwa+ROWgMZCjyOjDbIMoU11KkaUOVhnztZyLGCA==,iv:+EvAvf7cUpljLHaxVkBRloZsAYcKjceJHinUU47PCRI=,tag:p0irO6vnt5nr4sZIq9B8gA==,type:str]
disk-key: ENC[AES256_GCM,data:cJdjG1gWYT4V0idae0nZl0j9FoEQuMW5PhQer2s8t4piv2mE8XM64W92MJyhi2aNtZ3cJ9h5PSW49zLeUWXIPGJNAvwRyWVc0O+T96jlZqtFlYBYLVh4tXdpXmxvq7IhB+sR2rY7qpcJEtCyUR8Mc7uzPZLQhuicwOjYuThhMdq73v3Re4taiL358U4DsLGhaQaGVoZ/RVRqT40F0ByxZto+JbwFGJBjQJlBhxE0b5pge93hQJcyY0LiI0Ctkv43gR5pnkHpXlM5TqZvzJLQVkG+N9IaRg0fPBnTyR8IaTi6ZAqBTY9byMPbfRsMgwY/FdGCkBguLNBt8a8P4TzzKo8CwcBcSOcCMKh+tzBwIAOxFb3H6lgLiKutA5wxgOrJ1tADvPxjEOjPx3zXVZA1jzsqtH4p6s5XDKJVhSoT08gI6DN7ILhBG9v8+NDeBj8ENFkMxDnbFrEyBt2j1fwq5s2/SmioN407KVi8Jd7SqQBEcp2WHFkrc95nJTyDer0J34jVUPVtVaqmLAPlzKWr9VZyrDJbl4stwz/pjstxtDfx4urxNYn6fhs3vigU6JFrE3sVN4MMosgvDxyqiMM44Qc6V6XO1GDJxKUo9kP8CGNvL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MZSY9ZSjQaxMUNqXfySCry3AsOZolo6XUtbEk3YGGVAiJoiUE9aogdh++zRVYi+s2pzwf8BYGK2OB+C8ojSTRtcjsTCacWlV4cCnkpC5hpQ7KBycg8hYEm3bTjMuKcqsSTl8TUgwk4gq2cq2ZqvTWE7AHcgLGiFcT4/vm05rdS8j+nq5XprBUAwcvhR+wHtgU/HcJr939hp/45ZVI5a2DtcbhFOnrX+W/TZsUHdw+pxzau4JUfMI5COc3ntD0IOwP8c/dH+DOYeI6KToV8judUnIyMKnJrXBRpGoLa9kmbslUpw2oZSnQo1jBB1rQqLiQmbjA3nybAunmgrnaMtZcZZBX,iv:Y2rQMzIP4iA4YTRReMhIaG6aKTnlQjBl/eVdxg9gipM=,tag:m9KlqWLIxQ5065DBB8u0rw==,type:str]
protonvpn: protonvpn:
username: ENC[AES256_GCM,data:8jTLeHnmKzWIk7G2Q9m1kQ==,iv:FYuHAN3s/0DL/N3uQMeMCOW+SRmN9Mhx7ygMcWqBjMc=,tag:NXPYwxuSJxMm5rAE0mAgJg==,type:str] username: ENC[AES256_GCM,data:8jTLeHnmKzWIk7G2Q9m1kQ==,iv:FYuHAN3s/0DL/N3uQMeMCOW+SRmN9Mhx7ygMcWqBjMc=,tag:NXPYwxuSJxMm5rAE0mAgJg==,type:str]
password: ENC[AES256_GCM,data:doniXa2cguAyhhCS+VX/w2BgIUYAaNgbj1mNP2HlvHU=,iv:ds9jHnzvwXTWdCZbkRMrNpVN7kdIvNDtuyRUyf59sgw=,tag:tlGG4ixZkPofq0CjExOuTQ==,type:str] password: ENC[AES256_GCM,data:doniXa2cguAyhhCS+VX/w2BgIUYAaNgbj1mNP2HlvHU=,iv:ds9jHnzvwXTWdCZbkRMrNpVN7kdIvNDtuyRUyf59sgw=,tag:tlGG4ixZkPofq0CjExOuTQ==,type:str]
age-keys-private: age-keys-private:
matt-desktop-nix: ENC[AES256_GCM,data:7/UO2Oq096iJHSpwA2cflRoiPWrKFJA2RhcuH0bJKM/MO15GbW1VktPZieEVrj+3KTYnhrWr5mEHx+uekhyL2W98SO0JkIJ/c24=,iv:w9lt2rQzkys2HSR8ls4RKJlkNsAb61a+6eB/joKDEtQ=,tag:OYkFVP9HGHumE/3PUP64PA==,type:str] matt-desktop-nix: ENC[AES256_GCM,data:7/UO2Oq096iJHSpwA2cflRoiPWrKFJA2RhcuH0bJKM/MO15GbW1VktPZieEVrj+3KTYnhrWr5mEHx+uekhyL2W98SO0JkIJ/c24=,iv:w9lt2rQzkys2HSR8ls4RKJlkNsAb61a+6eB/joKDEtQ=,tag:OYkFVP9HGHumE/3PUP64PA==,type:str]
admin-jallen-nas: ENC[AES256_GCM,data:lKXCpyB0+wViUYsJgxxe7a4dD24a80xe1XEfvVLoazEb/qmoUClhXU4FI1o8ATvpND4XG/vlq8IsZ3V3Yr2FQSOQTrUxs+Yz1po=,iv:Po0jpfoHNMu4s6EePwD20Kc0HQhnY+YKnwovkqCzviI=,tag:0YHI6cNWV21OH2gMOX/Gmw==,type:str] admin-jallen-nas: ENC[AES256_GCM,data:lKXCpyB0+wViUYsJgxxe7a4dD24a80xe1XEfvVLoazEb/qmoUClhXU4FI1o8ATvpND4XG/vlq8IsZ3V3Yr2FQSOQTrUxs+Yz1po=,iv:Po0jpfoHNMu4s6EePwD20Kc0HQhnY+YKnwovkqCzviI=,tag:0YHI6cNWV21OH2gMOX/Gmw==,type:str]

View File

@@ -6,15 +6,7 @@
... ...
}: }:
let let
inherit (lib.${namespace}) enabled disabled mkContainer; inherit (lib.${namespace}) enabled disabled;
testcontainer = mkContainer {
name = "testContainer";
localAddress = "10.1.1.3";
ports = [ 80 ];
bindMounts = { };
config = { };
};
in in
{ {
imports = [ imports = [

View File

@@ -1,6 +1,4 @@
{ {
config,
lib,
pkgs, pkgs,
... ...
}: }:

View File

@@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
pkgs,
... ...
}: }:
# let # let