1
Files
flake-nixinator/system/services/comfyui.nix

55 lines
1.3 KiB
Nix

{
config,
lib,
pkgs,
...
}: let
comfyuiVersion = "cu128-slim-20260316";
in {
virtualisation.oci-containers.containers = {
comfyui = {
image = "yanwk/comfyui-boot:${comfyuiVersion}";
autoStart = false;
login = {
# Uses DockerHub by default
# registry = "";
# DockerHub Credentials
username = "christoph.urlacher@protonmail.com";
passwordFile = "${config.sops.secrets.docker-password.path}";
};
dependsOn = [];
ports = [
"8188:8188"
];
volumes = let
rootDir = "/home/christoph/Downloads/Comfy";
in [
"${rootDir}/storage:/root"
"${rootDir}/storage-models/models:/root/ComfyUI/models"
"${rootDir}/storage-models/hf-hub:/root/.cache/huggingface/hub"
"${rootDir}/storage-models/torch-hub:/root/.cache/torch/hub"
"${rootDir}/storage-user/input:/root/ComfyUI/input"
"${rootDir}/storage-user/output:/root/ComfyUI/output"
"${rootDir}/storage-user/workflows:/root/ComfyUI/user/default/workflows"
];
environment = {
PUID = "1000";
PGID = "1000";
TZ = "Europe/Berlin";
};
extraOptions = [
"--privileged"
"--device=nvidia.com/gpu=all"
# "--net=behind-nginx"
];
};
};
}