slopfarms

This commit is contained in:
tulg 2026-05-11 01:22:48 +03:00
parent fafb1bb009
commit 5acdaed42a
6 changed files with 162 additions and 5 deletions

View file

@ -13,6 +13,7 @@
../../modules/servers/common.nix
../../modules/servers/per-host/overlord/nixarr.nix
../../modules/servers/per-host/overlord/share.nix
./slopfarms.nix
];
programs.tmux = {
enable = true;

View file

@ -16,7 +16,23 @@
boot.initrd.kernelModules = ["dm-snapshot"];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
services.xserver.videoDrivers = ["nvidia"];
hardware.graphics = {
enable = true;
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction

View file

@ -0,0 +1,92 @@
{
pkgs,
lib,
...
}: {
services.n8n = {
enable = true;
openFirewall = true;
environment = {
host = "0.0.0.0";
port = 5678;
protocol = "http";
};
environment = {
N8N_SECURE_COOKIE = "false";
N8N_EXECUTE_COMMAND_ENABLED = "true";
N8N_ENABLE_EXECUTE_COMMAND = "true";
NODES_EXCLUDE = "[]";
N8N_NODES_INCLUDE = "n8n-nodes-base.executeCommand";
N8N_BINARY_DATA_STORAGE_PATH = "/srv/slopfarm";
};
};
systemd.services.n8n.serviceConfig = {
ReadWritePaths = ["/srv/slopfarm"];
SupplementaryGroups = ["video" "render"];
PrivateDevices = lib.mkForce false;
DevicePolicy = lib.mkForce "auto";
DeviceAllow = [
"/dev/nvidiactl rw"
"/dev/nvidia0 rw"
"/dev/nvidia-uvm rw"
"/dev/nvidia-uvm-tools rw"
"/dev/nvidia-modeset rw"
];
};
environment.systemPackages = with pkgs; [
ffmpeg
piper-tts
git
yt-dlp
cudaPackages.cudatoolkit
(python3.withPackages (ps:
with ps; [
requests
aiohttp
praw
torch
torchvision
transformers
accelerate
sentencepiece
safetensors
soundfile
librosa
pydub
scipy
pillow
moviepy
imageio
imageio-ffmpeg
opencv4
numpy
tqdm
regex
python-dotenv
pysrt
flask
]))
];
systemd.tmpfiles.rules = [
"d /srv/slopfarm 0755 n8n n8n -"
"d /srv/slopfarm/input 0755 n8n n8n -"
"d /srv/slopfarm/output 0755 n8n n8n -"
"d /srv/slopfarm/scripts 0755 n8n n8n -"
"d /srv/slopfarm/backgrounds 0755 n8n n8n -"
"d /srv/slopfarm/voices 0755 n8n n8n -"
];
}