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

View File

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

View File

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

View File

@@ -8,46 +8,6 @@ with lib;
let
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
reverseProxyServiceConfigs =
let
@@ -69,7 +29,6 @@ let
cacheUrl = "http://${serverIp}:9012";
hassUrl = "http://10.0.1.4:8123";
lubeloggerUrl = "http://${serverIp}:6754";
# Plugins
traefikPlugins = {
@@ -230,9 +189,11 @@ in
};
};
api.dashboard = true;
# Access the Traefik dashboard on <Traefik IP>:8080 of your server
api.insecure = true;
# Access the Traefik dashboard on <Traefik IP>:8080
api = {
dashboard = true;
insecure = true;
};
experimental = {
plugins = traefikPlugins;
@@ -240,22 +201,6 @@ in
};
dynamicConfigOptions = {
# udp = {
# services = {
# wireguard.loadBalancer.servers = [
# {
# url = "localhost:51820";
# }
# ];
# };
# routers = {
# wireguard = {
# entryPoints = [ "websecure" ];
# service = "wireguard";
# };
# };
# };
http = {
middlewares = {
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 = {
@@ -381,7 +289,6 @@ in
}
];
}
// extraServiceConfigs
// reverseProxyServiceConfigs;
routers = {
@@ -405,7 +312,7 @@ in
priority = 10;
tls.certResolver = "letsencrypt";
};
hass = {
entryPoints = [ "websecure" ];
rule = "Host(`hass.${domain}`)";
@@ -413,13 +320,12 @@ in
middlewares = [
"crowdsec"
"whitelist-geoblock"
"authentik"
# "authentik"
];
priority = 10;
tls.certResolver = "letsencrypt";
};
}
// extraRouterConfigs
// reverseProxyRouterConfigs;
};
};

View File

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

View File

@@ -1,7 +1,6 @@
{
stdenv,
lib,
python3Packages,
fetchFromGitHub,
...
}:
@@ -26,19 +25,19 @@ stdenv.mkDerivation rec {
mkdir -p $out
cp -r $src $out
'';
# ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui
# ln -s $out/bin/comfy-ui $out/bin/comfyui
# ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui
# ln -s $out/bin/comfy-ui $out/bin/comfyui
passthru = {
inherit
# comfyuiSrc
# pythonRuntime
# modelDownloaderDir
# frontendRoot
# dependencies
version
# comfyuiSrc
# pythonRuntime
# modelDownloaderDir
# frontendRoot
# dependencies
version
;
};
meta = with lib; {
@@ -55,4 +54,4 @@ stdenv.mkDerivation rec {
maintainers = [ ];
mainProgram = "comfy-ui";
};
}
}

View File

@@ -1,7 +1,6 @@
{
stdenv,
lib,
python3Packages,
fetchFromGitHub,
...
}:
@@ -26,19 +25,19 @@ stdenv.mkDerivation rec {
mkdir -p $out
cp -r $src $out
'';
# ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui
# ln -s $out/bin/comfy-ui $out/bin/comfyui
# ln -s ${comfyUiLauncher}/bin/comfy-ui $out/bin/comfy-ui
# ln -s $out/bin/comfy-ui $out/bin/comfyui
passthru = {
inherit
# comfyuiSrc
# pythonRuntime
# modelDownloaderDir
# frontendRoot
# dependencies
version
# comfyuiSrc
# pythonRuntime
# modelDownloaderDir
# frontendRoot
# dependencies
version
;
};
meta = with lib; {
@@ -55,4 +54,4 @@ stdenv.mkDerivation rec {
maintainers = [ ];
mainProgram = "comfy-ui";
};
}
}

View File

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

View File

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

View File

@@ -1,9 +1,9 @@
{ python3Packages, fetchurl, lib, ... }:
{ python3Packages, fetchurl, ... }:
python3Packages.buildPythonPackage rec {
pname = "comfy-kitchen";
version = "0.2.7";
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 {
url = "https://files.pythonhosted.org/packages/f8/65/d483613734d0b9753bd9bfa297ff334cb2c7766e82306099db6b259b4e2c/comfy_kitchen-0.2.7-py3-none-any.whl";
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]
disk-key: ENC[AES256_GCM,data:cJdjG1gWYT4V0idae0nZl0j9FoEQuMW5PhQer2s8t4piv2mE8XM64W92MJyhi2aNtZ3cJ9h5PSW49zLeUWXIPGJNAvwRyWVc0O+T96jlZqtFlYBYLVh4tXdpXmxvq7IhB+sR2rY7qpcJEtCyUR8Mc7uzPZLQhuicwOjYuThhMdq73v3Re4taiL358U4DsLGhaQaGVoZ/RVRqT40F0ByxZto+JbwFGJBjQJlBhxE0b5pge93hQJcyY0LiI0Ctkv43gR5pnkHpXlM5TqZvzJLQVkG+N9IaRg0fPBnTyR8IaTi6ZAqBTY9byMPbfRsMgwY/FdGCkBguLNBt8a8P4TzzKo8CwcBcSOcCMKh+tzB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wxuSJxMm5rAE0mAgJg==,type:str]
password: ENC[AES256_GCM,data:doniXa2cguAyhhCS+VX/w2BgIUYAaNgbj1mNP2HlvHU=,iv:ds9jHnzvwXTWdCZbkRMrNpVN7kdIvNDtuyRUyf59sgw=,tag:tlGG4ixZkPofq0CjExOuTQ==,type:str]
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]
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
inherit (lib.${namespace}) enabled disabled mkContainer;
testcontainer = mkContainer {
name = "testContainer";
localAddress = "10.1.1.3";
ports = [ 80 ];
bindMounts = { };
config = { };
};
inherit (lib.${namespace}) enabled disabled;
in
{
imports = [

View File

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

View File

@@ -1,7 +1,6 @@
{
config,
lib,
pkgs,
...
}:
# let
@@ -45,7 +44,7 @@
# };
# systemd.services = {
# vpn-netns =
# vpn-netns =
# let
# ip = "${pkgs.iproute2}/bin/ip";
# in {
@@ -291,4 +290,4 @@
};
};
};
}
}