feat(nix): add comfy-ui module and enable it for server
This commit is contained in:
parent
fbd8a20036
commit
8db9ceb372
2 changed files with 35 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
extraCfg.server.web-apps.comfy-ui.enable = true;
|
||||
};
|
||||
apollo = {
|
||||
graphical = false;
|
||||
|
|
34
nix/modules/server/web-apps/comfy-ui.nix
Normal file
34
nix/modules/server/web-apps/comfy-ui.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib.lists) singleton;
|
||||
inherit (config.flake.lib.services) mkWebApp;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.default =
|
||||
{ config, ... }:
|
||||
let
|
||||
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.services.comfyUi = {
|
||||
enable = true;
|
||||
listenHost = "0.0.0.0";
|
||||
};
|
||||
}
|
||||
// {
|
||||
imports = [ inputs.stable-diffusion-webui-nix.nixosModules.default ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue