slopfarms
This commit is contained in:
parent
fafb1bb009
commit
5acdaed42a
6 changed files with 162 additions and 5 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
../../modules/nixos/networking/ssh.nix
|
../../modules/nixos/networking/ssh.nix
|
||||||
../../modules/nixos/users/tulg.nix
|
../../modules/nixos/users/tulg.nix
|
||||||
./traefik.nix
|
./traefik.nix
|
||||||
#../../modules/home-manager/cli/default.nix
|
./home.nix
|
||||||
../../modules/servers/per-host/kittykat/vaultwarden.nix
|
../../modules/servers/per-host/kittykat/vaultwarden.nix
|
||||||
|
|
||||||
../../modules/servers/per-host/kittykat/xray.nix
|
../../modules/servers/per-host/kittykat/xray.nix
|
||||||
|
|
|
||||||
25
hosts/kittykat/home.nix
Normal file
25
hosts/kittykat/home.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
backupFileExtension = "backup";
|
||||||
|
|
||||||
|
users.tulg = {
|
||||||
|
home.username = "tulg";
|
||||||
|
home.homeDirectory = "/home/tulg";
|
||||||
|
home.stateVersion = "25.05";
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
../../modules/home-manager/pkgs.nix
|
||||||
|
../../modules/home-manager/cli/default.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -2,10 +2,20 @@
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [80 443 25565 25567];
|
allowedTCPPorts = [80 443 25565 25567];
|
||||||
|
extraInputRules = ''
|
||||||
|
tcp dport 2053 drop
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
networking.firewall.extraInputRules = ''
|
|
||||||
tcp dport 2053 drop
|
services.static-web-server = {
|
||||||
''; #fuck off
|
enable = true;
|
||||||
|
listen = "127.0.0.1:8080";
|
||||||
|
root = "/var/www/kittykat";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /var/www/kittykat 0755 root root -"
|
||||||
|
];
|
||||||
|
|
||||||
services.traefik = {
|
services.traefik = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -14,7 +24,7 @@
|
||||||
entryPoints = {
|
entryPoints = {
|
||||||
web = {
|
web = {
|
||||||
address = ":80";
|
address = ":80";
|
||||||
http.redirections.entrypoint = {
|
http.redirections.entryPoint = {
|
||||||
to = "websecure";
|
to = "websecure";
|
||||||
scheme = "https";
|
scheme = "https";
|
||||||
};
|
};
|
||||||
|
|
@ -40,5 +50,18 @@
|
||||||
|
|
||||||
api.dashboard = true;
|
api.dashboard = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
dynamicConfigOptions.http = {
|
||||||
|
routers.plain-html = {
|
||||||
|
rule = "Host(`poggerer.xyz`)";
|
||||||
|
entryPoints = ["websecure"];
|
||||||
|
service = "plain-html";
|
||||||
|
tls.certResolver = "letsencrypt";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.plain-html.loadBalancer.servers = [
|
||||||
|
{url = "http://127.0.0.1:8080";}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
../../modules/servers/common.nix
|
../../modules/servers/common.nix
|
||||||
../../modules/servers/per-host/overlord/nixarr.nix
|
../../modules/servers/per-host/overlord/nixarr.nix
|
||||||
../../modules/servers/per-host/overlord/share.nix
|
../../modules/servers/per-host/overlord/share.nix
|
||||||
|
./slopfarms.nix
|
||||||
];
|
];
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,23 @@
|
||||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
boot.initrd.kernelModules = ["dm-snapshot"];
|
||||||
boot.kernelModules = ["kvm-amd"];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [];
|
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
|
# 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
|
# (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
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
|
|
||||||
92
hosts/overlord/slopfarms.nix
Normal file
92
hosts/overlord/slopfarms.nix
Normal 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 -"
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue