mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
feat: added comfy ui
This commit is contained in:
parent
2085a2de54
commit
47dd4e52e5
2 changed files with 73 additions and 1 deletions
33
modules/config/instances/config/comfyui.nix
Normal file
33
modules/config/instances/config/comfyui.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ moduleFunctions }:
|
||||||
|
let
|
||||||
|
inherit (moduleFunctions.instancesFunctions)
|
||||||
|
domain3
|
||||||
|
servicePath
|
||||||
|
sslPath
|
||||||
|
sopsPath
|
||||||
|
;
|
||||||
|
|
||||||
|
label = "ComfyUI";
|
||||||
|
name = "comfyui";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
label = label;
|
||||||
|
name = name;
|
||||||
|
short = label;
|
||||||
|
|
||||||
|
sops = {
|
||||||
|
path0 = "${sopsPath}/${name}";
|
||||||
|
};
|
||||||
|
tags = [
|
||||||
|
name
|
||||||
|
"comfy"
|
||||||
|
"ui"
|
||||||
|
];
|
||||||
|
paths = {
|
||||||
|
path0 = "${servicePath}/${label}";
|
||||||
|
};
|
||||||
|
ports = {
|
||||||
|
port0 = 8188;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -4,6 +4,17 @@
|
||||||
flake,
|
flake,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
inherit (flake.config.machines.devices)
|
||||||
|
ceres
|
||||||
|
;
|
||||||
|
inherit (flake.config.services.instances)
|
||||||
|
comfyui
|
||||||
|
web
|
||||||
|
;
|
||||||
|
service = comfyui;
|
||||||
|
localhost = web.localhost.address1;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
flake.inputs.nix-comfyui.overlays.default
|
flake.inputs.nix-comfyui.overlays.default
|
||||||
|
@ -12,7 +23,7 @@
|
||||||
services.comfyui = {
|
services.comfyui = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
host = "0.0.0.0"; # Allow external connections
|
host = localhost;
|
||||||
package = pkgs.comfyuiPackages.comfyui.override {
|
package = pkgs.comfyuiPackages.comfyui.override {
|
||||||
extensions = with pkgs.comfyuiPackages.extensions; [
|
extensions = with pkgs.comfyuiPackages.extensions; [
|
||||||
acly-inpaint
|
acly-inpaint
|
||||||
|
@ -26,4 +37,32 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
fileSystems."/var/lib/${service.name}" = {
|
||||||
|
device = service.paths.path0;
|
||||||
|
fsType = "none";
|
||||||
|
options = [
|
||||||
|
"bind"
|
||||||
|
];
|
||||||
|
depends = [
|
||||||
|
ceres.storage0.mount
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
|
||||||
|
"Z ${service.sops.path0} 755 ${service.name} ${service.name} -"
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.${service.name}.extraGroups = [
|
||||||
|
"nginx"
|
||||||
|
"caddy"
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
service.ports.port0
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue