ai stuff (like open webui (ollama ui)) some cleanup

This commit is contained in:
Adrian Gunnar Lauterer 2024-12-08 13:07:44 +01:00
parent a7277567d4
commit 0f028a075a
6 changed files with 18 additions and 81 deletions

View File

@ -21,7 +21,6 @@
../../services/smb.nix
../../services/wordpress.nix
../../services/torrent.nix
../../services/mc.nix
#../../services/ozai.nix
#../../services/stableDiffusion.nix
../../services/rss.nix

View File

@ -5,7 +5,7 @@
./base.nix
../services/podman.nix
../services/ollama.nix
# ../services/ollama-webui.nix
../services/ollamaWebui.nix
# ../services/whisper.nix
];

View File

@ -1,44 +0,0 @@
{ config, lib, pkgs, ... }:
let
mcPort = 25565;
configurationFile = ''
config:
lite:
enabled: true
routes:
- host: mc.256.no
backend: 100.84.215.84:25565
'';
file = pkgs.writeText "gate.yaml" configurationFile;
in
{
networking.firewall.allowedTCPPorts = [ mcPort];
networking.firewall.allowedUDPPorts = [ mcPort];
users.users.gate = {
isSystemUser = true;
description = "Gate Minecraft Proxy User";
home = "/var/lib/gate";
createHome = true;
group = "gate";
};
users.groups.gate = {
};
systemd.services."gate" = {
after = [ "network.target" ];
wants = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.gate}/bin/gate -c ${file}";
User = "gate";
Group = "gate";
Restart = "on-failure";
ProtectKernelModules = true;
NoNewPrivileges = true;
};
};
}

View File

@ -1,20 +0,0 @@
{ config, pkgs, lib, ... }:
{
services.minecraft-server = {
enable = true;
eula = true;
#jvmOpts = "-Xms4092M -Xmx4092M -XX:+UseG1GC -XX:+CMSIncrementalPacing -XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10";
# serverProperties = {
# server-port = 25500;
# difficulty = 3;
# gamemode = 1;
# max-players = 8;
# motd = "Adrian Minecraft server!";
# };
openFirewall = true;
};
}

17
services/ollamaWebui.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, pkgs, lib, ... }:
{
environment.systemPackages = [
pkgs.unstable.open-webui
];
services.open-webui = {
enable = true;
package = pkgs.unstable.open-webui;
port = 11111;
host = "0.0.0.0";
openFirewall = true;
};
}

View File

@ -1,15 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
./podman.nix
];
environment.systemPackages = [
];
virtualisation.oci-containers.containers."stableDiffusion" = {
#cmd = ["invokeai-web" "--host" "0.0.0.0"];
ports = ["9090:9090" "9000:80" ];
#enviroment = { };
#image = "invokeai/invokeai";
image = "goolashe/automatic1111-sd-webui";
};
}