First Commit.
This commit is contained in:
8
modules/nixos/ai/index.nix
Normal file
8
modules/nixos/ai/index.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./ollama.nix
|
||||
./open-webui.nix
|
||||
./sillytavern.nix
|
||||
];
|
||||
}
|
||||
10
modules/nixos/ai/ollama.nix
Normal file
10
modules/nixos/ai/ollama.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [ ];
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
host = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
||||
18
modules/nixos/ai/open-webui.nix
Normal file
18
modules/nixos/ai/open-webui.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [ ];
|
||||
services.open-webui = {
|
||||
#enable = true;
|
||||
enable = false;
|
||||
host = "0.0.0.0";
|
||||
openFirewall = true;
|
||||
port = 9001;
|
||||
environment =
|
||||
{
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
DO_NOT_TRACK = "True";
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
ENABLE_LOGIN_FORM = "True";
|
||||
};
|
||||
};
|
||||
}
|
||||
31
modules/nixos/ai/sillytavern.nix
Normal file
31
modules/nixos/ai/sillytavern.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [ ];
|
||||
services.sillytavern = {
|
||||
enable = true;
|
||||
#enable = false;
|
||||
port = 9002;
|
||||
listen = true;
|
||||
listenAddressIPv4 = "127.0.0.1";
|
||||
whitelist = true;
|
||||
#user = "tavern";
|
||||
#group = "tavern";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
#additionalModules = [ pkgs.nginxModules.pam ];
|
||||
virtualHosts."192.168.0.101" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:9002";
|
||||
extraConfig = ''
|
||||
auth_basic "Password Required";
|
||||
auth_basic_user_file /etc/htpasswd;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall.allowedTCPPorts = [ 80 ]; #9002
|
||||
}
|
||||
Reference in New Issue
Block a user