From 135e1e57011a1ba70dbb22470e72e84b55efa9eb Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Thu, 19 Mar 2026 17:43:22 +0100 Subject: [PATCH] Services/ComfyUI: Init at v2026-03-16 --- system/nixinator/default.nix | 1 + system/services/comfyui.nix | 54 ++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 system/services/comfyui.nix diff --git a/system/nixinator/default.nix b/system/nixinator/default.nix index 07572857..f3cb8850 100644 --- a/system/nixinator/default.nix +++ b/system/nixinator/default.nix @@ -12,6 +12,7 @@ ./disks.nix # General services + ../services/comfyui.nix ../services/fileflows-node.nix ]; diff --git a/system/services/comfyui.nix b/system/services/comfyui.nix new file mode 100644 index 00000000..ceaa97ac --- /dev/null +++ b/system/services/comfyui.nix @@ -0,0 +1,54 @@ +{ + 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" + ]; + }; + }; +}