mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 12:54:38 -05:00
55 lines
1 KiB
Nix
Executable file
55 lines
1 KiB
Nix
Executable file
{
|
|
config,
|
|
pkgs,
|
|
flake,
|
|
...
|
|
}:
|
|
let
|
|
inherit (flake.config.machines.devices) ceres;
|
|
inherit (flake.config.services.instances) comfyui web;
|
|
inherit (flake.config.people) user0;
|
|
service = comfyui;
|
|
localhost = web.localhost.address1;
|
|
in
|
|
{
|
|
nixpkgs.overlays = [
|
|
flake.inputs.nix-comfyui.overlays.default
|
|
];
|
|
|
|
services.comfyui = {
|
|
enable = true;
|
|
package = pkgs.comfyui-nvidia;
|
|
host = localhost;
|
|
models = builtins.attrValues pkgs.nixified-ai.models;
|
|
customNodes = with comfyui.pkgs; [
|
|
comfyui-gguf
|
|
comfyui-impact-pack
|
|
];
|
|
};
|
|
fileSystems."/var/lib/${service.name}" = {
|
|
device = service.paths.path0;
|
|
fsType = "none";
|
|
options = [
|
|
"bind"
|
|
];
|
|
depends = [
|
|
ceres.storage0.mount
|
|
];
|
|
};
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
|
|
];
|
|
|
|
users.users.${service.name}.extraGroups = [
|
|
"users"
|
|
];
|
|
|
|
networking = {
|
|
firewall = {
|
|
allowedTCPPorts = [
|
|
service.ports.port0
|
|
];
|
|
};
|
|
};
|
|
}
|