33 lines
955 B
Nix
33 lines
955 B
Nix
{ inputs, ... }:
|
|
{
|
|
flake.modules.nixos.aquatic-ai =
|
|
{config, lib, ...}:
|
|
{
|
|
options.aquaticConfig.ai = {
|
|
gpu = lib.mkOption {
|
|
default = "rocm";
|
|
description = "GPU to Support";
|
|
};
|
|
data = lib.mkOption {
|
|
default = "/AI/Comfyui";
|
|
description = "Dir for data to go in";
|
|
};
|
|
};
|
|
imports = [ inputs.comfyui-nix.nixosModules.default ];
|
|
config = {
|
|
nixpkgs.overlays = [ inputs.comfyui-nix.overlays.default ];
|
|
services.comfyui = {
|
|
enable = true;
|
|
gpuSupport = "${config.aquaticConfig.ai.gpu}";
|
|
enableManager = true; # Enable the built-in ComfyUI Manager
|
|
port = 8188;
|
|
listenAddress = "127.0.0.1"; # Use "0.0.0.0" for network access
|
|
dataDir = "${config.aquaticConfig.ai.data}";
|
|
openFirewall = false;
|
|
user = "aqua";
|
|
extraArgs = [ "--use-pytorch-cross-attention" ];
|
|
# environment = { };
|
|
};
|
|
};
|
|
};
|
|
}
|