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.vaultwarden.name
|
||||
instances.prompter.name
|
||||
instances.comfyui.name
|
||||
instances.firefly-iii.name
|
||||
];
|
||||
}
|
||||
|
|
@ -54,7 +53,6 @@ let
|
|||
name: "http://${ceres.ip.address0}:${builtins.toString instances.${name}.ports.port0}";
|
||||
services = [
|
||||
instances.jellyfin.name
|
||||
instances.comfyui.name
|
||||
instances.firefly-iii.name
|
||||
];
|
||||
}
|
||||
|
|
|
|||
48
modules/nixos/guests/comfyui/default.nix
Normal file → Executable file
48
modules/nixos/guests/comfyui/default.nix
Normal file → Executable file
|
|
@ -140,8 +140,29 @@ in
|
|||
80
|
||||
];
|
||||
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "*";
|
||||
type = "soft";
|
||||
item = "nofile";
|
||||
value = "65536";
|
||||
}
|
||||
{
|
||||
domain = "*";
|
||||
type = "hard";
|
||||
item = "nofile";
|
||||
value = "1048576";
|
||||
}
|
||||
];
|
||||
systemd = {
|
||||
services.docker-comfyui = {
|
||||
services = {
|
||||
docker = {
|
||||
serviceConfig = {
|
||||
LimitNOFILE = "infinity";
|
||||
LimitNPROC = "infinity";
|
||||
};
|
||||
};
|
||||
docker-comfyui = {
|
||||
after = [
|
||||
"network-online.target"
|
||||
"docker.service"
|
||||
|
|
@ -149,6 +170,7 @@ in
|
|||
wants = [ "network-online.target" ];
|
||||
requires = [ "docker.service" ];
|
||||
};
|
||||
};
|
||||
network = {
|
||||
enable = true;
|
||||
networks."20-lan" = {
|
||||
|
|
@ -179,6 +201,9 @@ in
|
|||
"vm.swappiness" = 1;
|
||||
"vm.dirty_ratio" = 15;
|
||||
"vm.dirty_background_ratio" = 5;
|
||||
"fs.file-max" = 2097152;
|
||||
"fs.inotify.max_user_watches" = 524288;
|
||||
"fs.inotify.max_user_instances" = 512;
|
||||
};
|
||||
|
||||
microvm = {
|
||||
|
|
@ -206,6 +231,15 @@ in
|
|||
}
|
||||
];
|
||||
|
||||
volumes = [
|
||||
{
|
||||
image = "${serviceCfg.mntPaths.path0}/docker-volume.img";
|
||||
mountPoint = "/var/lib/docker";
|
||||
size = 102400;
|
||||
autoCreate = true;
|
||||
}
|
||||
];
|
||||
|
||||
shares = [
|
||||
{
|
||||
mountPoint = "/nix/.ro-store";
|
||||
|
|
@ -219,12 +253,12 @@ in
|
|||
source = "${serviceCfg.mntPaths.path0}/data";
|
||||
tag = "${serviceCfg.name}_data";
|
||||
}
|
||||
{
|
||||
mountPoint = "/var/lib/docker";
|
||||
proto = "virtiofs";
|
||||
source = "${serviceCfg.mntPaths.path0}/docker"; # Store on host
|
||||
tag = "docker_data";
|
||||
}
|
||||
# {
|
||||
# mountPoint = "/var/lib/docker";
|
||||
# proto = "virtiofs";
|
||||
# source = "${serviceCfg.mntPaths.path0}/docker"; # Store on host
|
||||
# tag = "docker_data";
|
||||
# }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue