mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
feat: added comfyui
This commit is contained in:
parent
2e9f5e5260
commit
6f97e69745
2 changed files with 47 additions and 15 deletions
|
|
@ -36,7 +36,6 @@ let
|
||||||
instances.searx.name
|
instances.searx.name
|
||||||
instances.vaultwarden.name
|
instances.vaultwarden.name
|
||||||
instances.prompter.name
|
instances.prompter.name
|
||||||
instances.comfyui.name
|
|
||||||
instances.firefly-iii.name
|
instances.firefly-iii.name
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -54,7 +53,6 @@ let
|
||||||
name: "http://${ceres.ip.address0}:${builtins.toString instances.${name}.ports.port0}";
|
name: "http://${ceres.ip.address0}:${builtins.toString instances.${name}.ports.port0}";
|
||||||
services = [
|
services = [
|
||||||
instances.jellyfin.name
|
instances.jellyfin.name
|
||||||
instances.comfyui.name
|
|
||||||
instances.firefly-iii.name
|
instances.firefly-iii.name
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
60
modules/nixos/guests/comfyui/default.nix
Normal file → Executable file
60
modules/nixos/guests/comfyui/default.nix
Normal file → Executable file
|
|
@ -140,14 +140,36 @@ in
|
||||||
80
|
80
|
||||||
];
|
];
|
||||||
|
|
||||||
|
security.pam.loginLimits = [
|
||||||
|
{
|
||||||
|
domain = "*";
|
||||||
|
type = "soft";
|
||||||
|
item = "nofile";
|
||||||
|
value = "65536";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
domain = "*";
|
||||||
|
type = "hard";
|
||||||
|
item = "nofile";
|
||||||
|
value = "1048576";
|
||||||
|
}
|
||||||
|
];
|
||||||
systemd = {
|
systemd = {
|
||||||
services.docker-comfyui = {
|
services = {
|
||||||
after = [
|
docker = {
|
||||||
"network-online.target"
|
serviceConfig = {
|
||||||
"docker.service"
|
LimitNOFILE = "infinity";
|
||||||
];
|
LimitNPROC = "infinity";
|
||||||
wants = [ "network-online.target" ];
|
};
|
||||||
requires = [ "docker.service" ];
|
};
|
||||||
|
docker-comfyui = {
|
||||||
|
after = [
|
||||||
|
"network-online.target"
|
||||||
|
"docker.service"
|
||||||
|
];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
requires = [ "docker.service" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
network = {
|
network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -179,6 +201,9 @@ in
|
||||||
"vm.swappiness" = 1;
|
"vm.swappiness" = 1;
|
||||||
"vm.dirty_ratio" = 15;
|
"vm.dirty_ratio" = 15;
|
||||||
"vm.dirty_background_ratio" = 5;
|
"vm.dirty_background_ratio" = 5;
|
||||||
|
"fs.file-max" = 2097152;
|
||||||
|
"fs.inotify.max_user_watches" = 524288;
|
||||||
|
"fs.inotify.max_user_instances" = 512;
|
||||||
};
|
};
|
||||||
|
|
||||||
microvm = {
|
microvm = {
|
||||||
|
|
@ -206,6 +231,15 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
volumes = [
|
||||||
|
{
|
||||||
|
image = "${serviceCfg.mntPaths.path0}/docker-volume.img";
|
||||||
|
mountPoint = "/var/lib/docker";
|
||||||
|
size = 102400;
|
||||||
|
autoCreate = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
shares = [
|
shares = [
|
||||||
{
|
{
|
||||||
mountPoint = "/nix/.ro-store";
|
mountPoint = "/nix/.ro-store";
|
||||||
|
|
@ -219,12 +253,12 @@ in
|
||||||
source = "${serviceCfg.mntPaths.path0}/data";
|
source = "${serviceCfg.mntPaths.path0}/data";
|
||||||
tag = "${serviceCfg.name}_data";
|
tag = "${serviceCfg.name}_data";
|
||||||
}
|
}
|
||||||
{
|
# {
|
||||||
mountPoint = "/var/lib/docker";
|
# mountPoint = "/var/lib/docker";
|
||||||
proto = "virtiofs";
|
# proto = "virtiofs";
|
||||||
source = "${serviceCfg.mntPaths.path0}/docker"; # Store on host
|
# source = "${serviceCfg.mntPaths.path0}/docker"; # Store on host
|
||||||
tag = "docker_data";
|
# tag = "docker_data";
|
||||||
}
|
# }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue