feat(web-apps): add comfy-ui web app, update stable-diffusion-webui
This commit is contained in:
parent
4dca26d81d
commit
d082b03bf1
4 changed files with 42 additions and 6 deletions
11
flake.lock
generated
11
flake.lock
generated
|
@ -944,15 +944,16 @@
|
||||||
"python-flexseal": "python-flexseal"
|
"python-flexseal": "python-flexseal"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1750702421,
|
"lastModified": 1751651278,
|
||||||
"narHash": "sha256-YqcUdBULlDDbRPo6bKM6GbmjnvKM++Sq+U2sgKY8/wc=",
|
"narHash": "sha256-RFP58g7aWQE9LW+Av0ljtOuuvwThICBikAx+l+cYL+4=",
|
||||||
"owner": "janrupf",
|
"owner": "rrvsh",
|
||||||
"repo": "stable-diffusion-webui-nix",
|
"repo": "stable-diffusion-webui-nix",
|
||||||
"rev": "144487fbf9757f157833d0272d226d69e5bb3741",
|
"rev": "e7d156aef717cdeb1a98c7fe77cbd76c6e437c05",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "janrupf",
|
"owner": "rrvsh",
|
||||||
|
"ref": "fix/comfy-ui-data-directory",
|
||||||
"repo": "stable-diffusion-webui-nix",
|
"repo": "stable-diffusion-webui-nix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
# Packages and services that we don't use nixpkgs for.
|
# Packages and services that we don't use nixpkgs for.
|
||||||
rrv-sh.url = "github:rrvsh/rrv.sh";
|
rrv-sh.url = "github:rrvsh/rrv.sh";
|
||||||
nvf.url = "github:rrvsh/nvf/uv-nvim";
|
nvf.url = "github:rrvsh/nvf/uv-nvim";
|
||||||
stable-diffusion-webui-nix.url = "github:janrupf/stable-diffusion-webui-nix";
|
stable-diffusion-webui-nix.url = "github:rrvsh/stable-diffusion-webui-nix/fix/comfy-ui-data-directory";
|
||||||
zjstatus.url = "github:dj95/zjstatus";
|
zjstatus.url = "github:dj95/zjstatus";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
34
modules/nixos/server/web-apps/comfy-ui/default.nix
Normal file
34
modules/nixos/server/web-apps/comfy-ui/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib) singleton;
|
||||||
|
inherit (lib.pantheon.modules) mkWebApp;
|
||||||
|
upstreamCfg = config.services.comfyUi;
|
||||||
|
in
|
||||||
|
mkWebApp {
|
||||||
|
inherit config;
|
||||||
|
name = "comfy-ui";
|
||||||
|
defaultPort = 8188;
|
||||||
|
persistDirs = singleton {
|
||||||
|
directory = upstreamCfg.dataDir;
|
||||||
|
inherit (upstreamCfg) user group;
|
||||||
|
mode = "777";
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
assertions = singleton {
|
||||||
|
assertion = config.machine.gpu.nvidia.enable;
|
||||||
|
message = "You must run the comfy-ui service only with an nvidia gpu.";
|
||||||
|
};
|
||||||
|
services.comfyUi = {
|
||||||
|
enable = true;
|
||||||
|
listenHost = "0.0.0.0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
imports = [ inputs.stable-diffusion-webui-nix.nixosModules.default ];
|
||||||
|
}
|
|
@ -36,4 +36,5 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
server.web-apps.sd-webui-forge.enable = true;
|
server.web-apps.sd-webui-forge.enable = true;
|
||||||
|
server.web-apps.comfy-ui.enable = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue