mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 12:54:38 -05:00
feat: added comfy ui
This commit is contained in:
parent
758f235736
commit
ee68cdee72
3 changed files with 104 additions and 104 deletions
100
modules/nixos/services/comfyui/default.nix
Executable file → Normal file
100
modules/nixos/services/comfyui/default.nix
Executable file → Normal file
|
@ -1,20 +1,88 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
services.comfyui = {
|
config,
|
||||||
enable = true;
|
lib,
|
||||||
openFirewall = true;
|
pkgs,
|
||||||
host = "0.0.0.0"; # Allow external connections
|
...
|
||||||
package = pkgs.comfyuiPackages.comfyui.override {
|
}:
|
||||||
extensions = with pkgs.comfyuiPackages.extensions; [
|
|
||||||
acly-inpaint
|
let
|
||||||
acly-tooling
|
cfg = config.services.comfyui;
|
||||||
cubiq-ipadapter-plus
|
in
|
||||||
fannovel16-controlnet-aux
|
{
|
||||||
];
|
imports = [ ];
|
||||||
commandLineArgs = [
|
|
||||||
"--preview-method"
|
options = {
|
||||||
"auto"
|
services.comfyui = with lib; {
|
||||||
];
|
enable = mkEnableOption "ComfyUI service";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.comfyuiPackages.comfyui.override {
|
||||||
|
extensions = with pkgs.comfyuiPackages.extensions; [
|
||||||
|
# Add desired extensions here
|
||||||
|
# Example extensions:
|
||||||
|
# acly-inpaint
|
||||||
|
# acly-tooling
|
||||||
|
# cubiq-ipadapter-plus
|
||||||
|
# fannovel16-controlnet-aux
|
||||||
|
];
|
||||||
|
commandLineArgs = [
|
||||||
|
"--preview-method"
|
||||||
|
"auto"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
description = "The ComfyUI package to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 8188;
|
||||||
|
description = "Port to listen on";
|
||||||
|
};
|
||||||
|
|
||||||
|
host = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "127.0.0.1";
|
||||||
|
description = "Host to bind to";
|
||||||
|
};
|
||||||
|
|
||||||
|
openFirewall = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Open ports in the firewall";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
|
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||||
|
allowedTCPPorts = [ cfg.port ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.comfyui = {
|
||||||
|
description = "ComfyUI Service";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${cfg.package}/bin/comfyui --port ${toString cfg.port} --listen ${cfg.host}";
|
||||||
|
Restart = "on-failure";
|
||||||
|
User = "comfyui";
|
||||||
|
Group = "comfyui";
|
||||||
|
WorkingDirectory = "/var/lib/comfyui";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.comfyui = {
|
||||||
|
group = "comfyui";
|
||||||
|
isSystemUser = true;
|
||||||
|
home = "/var/lib/comfyui";
|
||||||
|
createHome = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.comfyui = { };
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.services.comfyui;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ ];
|
|
||||||
|
|
||||||
options = {
|
|
||||||
services.comfyui = with lib; {
|
|
||||||
enable = mkEnableOption "ComfyUI service";
|
|
||||||
|
|
||||||
package = mkOption {
|
|
||||||
type = types.package;
|
|
||||||
default = pkgs.comfyuiPackages.comfyui.override {
|
|
||||||
extensions = with pkgs.comfyuiPackages.extensions; [
|
|
||||||
# Add desired extensions here
|
|
||||||
# Example extensions:
|
|
||||||
# acly-inpaint
|
|
||||||
# acly-tooling
|
|
||||||
# cubiq-ipadapter-plus
|
|
||||||
# fannovel16-controlnet-aux
|
|
||||||
];
|
|
||||||
commandLineArgs = [
|
|
||||||
"--preview-method"
|
|
||||||
"auto"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
description = "The ComfyUI package to use";
|
|
||||||
};
|
|
||||||
|
|
||||||
port = mkOption {
|
|
||||||
type = types.port;
|
|
||||||
default = 8188;
|
|
||||||
description = "Port to listen on";
|
|
||||||
};
|
|
||||||
|
|
||||||
host = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "127.0.0.1";
|
|
||||||
description = "Host to bind to";
|
|
||||||
};
|
|
||||||
|
|
||||||
openFirewall = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = "Open ports in the firewall";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
environment.systemPackages = [ cfg.package ];
|
|
||||||
|
|
||||||
networking.firewall = lib.mkIf cfg.openFirewall {
|
|
||||||
allowedTCPPorts = [ cfg.port ];
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.comfyui = {
|
|
||||||
description = "ComfyUI Service";
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [ "network.target" ];
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${cfg.package}/bin/comfyui --port ${toString cfg.port} --listen ${cfg.host}";
|
|
||||||
Restart = "on-failure";
|
|
||||||
User = "comfyui";
|
|
||||||
Group = "comfyui";
|
|
||||||
WorkingDirectory = "/var/lib/comfyui";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.comfyui = {
|
|
||||||
group = "comfyui";
|
|
||||||
isSystemUser = true;
|
|
||||||
home = "/var/lib/comfyui";
|
|
||||||
createHome = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.groups.comfyui = { };
|
|
||||||
};
|
|
||||||
}
|
|
20
systems/ceres/config/comfyui.nix
Executable file
20
systems/ceres/config/comfyui.nix
Executable file
|
@ -0,0 +1,20 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.comfyui = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
host = "0.0.0.0"; # Allow external connections
|
||||||
|
package = pkgs.comfyuiPackages.comfyui.override {
|
||||||
|
extensions = with pkgs.comfyuiPackages.extensions; [
|
||||||
|
acly-inpaint
|
||||||
|
acly-tooling
|
||||||
|
cubiq-ipadapter-plus
|
||||||
|
fannovel16-controlnet-aux
|
||||||
|
];
|
||||||
|
commandLineArgs = [
|
||||||
|
"--preview-method"
|
||||||
|
"auto"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue