diff --git a/flake.nix b/flake.nix index e22dd8e..36a5162 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,7 @@ pkgs-unstable = import nixpkgs-unstable { system = system; config.allowUnfree = true; + overlays = [ comfyui-nix.overlays.default ]; }; # Host type abstractions @@ -146,6 +147,7 @@ pkgs-unstable = import nixpkgs-unstable { system = "aarch64-darwin"; config.allowUnfree = true; + overlays = [ comfyui-nix.overlays.default ]; }; }; system = "aarch64-darwin"; diff --git a/hosts/ender-ml/configuration.nix b/hosts/ender-ml/configuration.nix index fb9b15b..2742d43 100644 --- a/hosts/ender-ml/configuration.nix +++ b/hosts/ender-ml/configuration.nix @@ -152,22 +152,28 @@ services.comfyui = { enable = true; - cuda = true; enableManager = true; listenAddress = "0.0.0.0"; dataDir = "/home/rogueking/models/comfyui-data"; user = "rogueking"; group = "users"; + package = pkgs-unstable.comfy-ui-cuda; #createUser = true; # Use existing user # If dataDir is on a separate mount (NFS, ZFS dataset, etc.): # requiresMounts = [ "home-myuser-comfyui\\x2ddata.mount" ]; }; - #services.llama-cpp = { - # enable = true; - # package = pkgs-unstable.llama-cpp; - # model = "/home/rogueking/models"; - #}; + # Enable llama-cpp server + services.llama-cpp = { + enable = true; + package = (pkgs-unstable.llama-cpp.override { cudaSupport = true; }); + model = "/home/rogueking/models"; + host = "0.0.0.0"; + port = 8080; + extraFlags = [ + "n-gpu-layers 99" + ]; + }; # Define a user account. Don't forget to set a password with ‘passwd’. programs.zsh.enable = true; @@ -202,7 +208,7 @@ UseDns = true; X11Forwarding = false; PermitRootLogin = "no"; - MaxAuthTries = 8; + MaxAuthTries = 12; }; }; @@ -245,6 +251,7 @@ (pkgs-unstable.llama-cpp.override { cudaSupport = true; }) pkgs-unstable.vllm pkgs-unstable.witr + pkgs-unstable.comfy-ui-cuda ]; home-manager = {