iac/nixos/hosts/asxpio-services/sillytavern.yaml
Sergei Poljanski be68c5adef
nixos: describe both servers as NixOS systems
Start of the move from Ansible to NixOS. Services run as native NixOS
services where nixpkgs has a module and as Podman containers otherwise;
there is no Docker.

Shared: users with their Debian UIDs, SSH with the Ansible role's crypto
settings, nftables firewall, WireGuard (ops is the hub), sops-nix
secrets per host, the restic backup script with its schedule and
retention, mail on unit failure.

asxpio-services: Xray, SillyTavern, Minecraft (Paper) and the ACME
forwarder natively; XMPP stays in containers because the server is a
custom build.

asxpio-ops: Postgres, Garage and Forgejo natively. Roles, buckets, keys
and grants move here from the storage repo's init scripts.

Services that own data wait for /var/lib/.data-in-place, so an install
never creates empty state where a restore is about to land.
migration/*-data.sh move the Debian-era data into the new layout.

hosts/rehearsal turns the two hosts into a test pair with its own keys
and dummy secrets. Everything here ran there, Postgres, Garage, Forgejo,
Minecraft and SillyTavern on a restored copy of production data. Three
differences from the containers showed up and are handled: Garage
rejects a 0440 credential file, Geyser needs libcrypto and netlink,
SillyTavern ignores the module's listen flags.

Production is untouched: both servers still run Debian under Ansible.

Assisted-by: Claude:fable-5-2
2026-11-16 22:59:59 +04:00

171 lines
3.3 KiB
YAML

dataRoot: ./data
# Bound to the WireGuard address (in Docker this was the published port)
listen: true
listenAddress:
ipv4: 10.20.0.20
ipv6: "[::]"
protocol:
ipv4: true
ipv6: false
dnsPreferIPv6: false
browserLaunch:
enabled: false
browser: default
hostname: auto
port: -1
avoidLocalhost: false
port: 8000
ssl:
enabled: false
certPath: ./certs/cert.pem
keyPath: ./certs/privkey.pem
keyPassphrase: ""
whitelistMode: true
enableForwardedWhitelist: true
whitelist:
- ::1
- 127.0.0.1
- 10.20.0.0/24
whitelistDockerHosts: true
basicAuthMode: false
basicAuthUser:
username: user
password: password
enableCorsProxy: false
requestProxy:
enabled: false
url: socks5://username:password@example.com:1080
bypass:
- localhost
- 127.0.0.1
enableUserAccounts: true
enableDiscreetLogin: false
perUserBasicAuth: false
sso:
autheliaAuth: false
authentikAuth: false
trustedProxies:
- ::1
- 127.0.0.1
hostWhitelist:
enabled: false
scan: true
hosts: []
sessionTimeout: -1
disableCsrfProtection: false
securityOverride: false
logging:
enableAccessLog: true
minLogLevel: 0
rateLimiting:
preferRealIpHeader: false
basicAuthMaxAttempts: 5
accountsLoginMaxAttempts: 5
accountsRecoverMaxAttempts: 5
accountsResetMaxAttempts: 5
backups:
common:
numberOfBackups: 50
chat:
enabled: true
checkIntegrity: true
maxTotalBackups: -1
throttleInterval: 10000
allowFullDataBackup: true
thumbnails:
enabled: true
format: jpg
quality: 95
dimensions:
bg:
- 160
- 90
avatar:
- 96
- 144
persona:
- 96
- 144
performance:
lazyLoadCharacters: false
memoryCacheCapacity: 100mb
useDiskCache: true
requestCompression:
enabled: false
minPayloadSize: 256kb
maxPayloadSize: 8mb
timeout: 4000
cacheBuster:
enabled: false
userAgentPattern: ""
allowKeysExposure: false
skipContentCheck: false
whitelistImportDomains:
- localhost
- cdn.discordapp.com
- files.catbox.moe
- raw.githubusercontent.com
- char-archive.evulid.cc
requestOverrides: []
extensions:
enabled: true
autoUpdate: true
models:
autoDownload: true
classification: Cohee/distilbert-base-uncased-go-emotions-onnx
captioning: Xenova/vit-gpt2-image-captioning
embedding: Cohee/jina-embeddings-v2-base-en
speechToText: Xenova/whisper-small
textToSpeech: Xenova/speecht5_tts
enableDownloadableTokenizers: true
promptPlaceholder: "[Start a new chat]"
openai:
randomizeUserId: false
captionSystemPrompt: ""
deepl:
formality: default
mistral:
enablePrefix: false
ollama:
keepAlive: -1
batchSize: -1
claude:
enableSystemPromptCache: false
cachingAtDepth: -1
extendedTTL: false
enableAdaptiveThinking: false
gemini:
apiVersion: v1beta
thoughtSignatures: true
enableSystemPromptCache: false
image:
personGeneration: allow_adult
enableServerPlugins: false
enableServerPluginsAutoUpdate: true
heartbeatInterval: 0
enableKeepAlive: false
cors:
enabled: true
origin:
- "null"
methods:
- OPTIONS
allowedHeaders: []
exposedHeaders: []
credentials: false
maxAge: null
privateAddressWhitelist:
enabled: false
allowUnresolvedHosts: false
log:
blockedRequests: true
allowedRequests: false
allowedRanges:
- 127.0.0.0/8
- ::1/128
forwardedHeaders:
xRealIp: true
xForwardedFor: true
cfConnectingIp: false
git:
backend: auto