Files
LiNix/modules/nixos/ai/sillytavern.nix
2025-10-12 10:17:09 -05:00

32 lines
645 B
Nix

{ 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
}