From 034c70e8667a63f304b5f8eb182a9c4ba89bd666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 17 Aug 2026 15:22:32 +0200 Subject: [PATCH] nixos/comfyui: append extraArgs after the module's own arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The module writes its own flags into services.comfyui.extraArgs, the option users write to as well. List definitions are concatenated and the module's landed last, so a flag set by the user was overridden by the module instead of overriding it: comfyui '--port=9999' '--base-directory=/srv/comfyui' \ '--base-directory=/var/lib/comfyui' … '--port=8188' Both of the user's flags are overwritten as argparse keeps the last occurrence of each. Assisted-by: Claude Code:claude-opus-5 (mostly) Co-authored-by: ilyusha <121713022+rokokol@users.noreply.github.com> --- nixos/modules/services/misc/comfyui.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/comfyui.nix b/nixos/modules/services/misc/comfyui.nix index e80ad201ec96..d48ed346e7ef 100644 --- a/nixos/modules/services/misc/comfyui.nix +++ b/nixos/modules/services/misc/comfyui.nix @@ -52,7 +52,7 @@ in }; config = lib.mkIf cfg.enable { - services.comfyui.extraArgs = [ + services.comfyui.extraArgs = lib.mkBefore [ "--base-directory=/var/lib/comfyui" "--database-url=sqlite:////var/lib/comfyui/user/comfyui.db" "--listen=${lib.concatStringsSep "," cfg.listen}"