AquaticOS/modules/servers/containers/sillytavern.nix

49 lines
No EOL
1.2 KiB
Nix

{ inputs, ... }:
{
flake.modules.nixos.sillytavern =
{ lib, ... }:
{
imports = with inputs.self.modules.nixos; [
podman
];
virtualisation.oci-containers.containers."sillytavern" = {
image = "ghcr.io/sillytavern/sillytavern:latest";
volumes = [
"/DockerData/configs/sillytavern/plugins:/home/node/app/plugins"
"/DockerData/configs/sillytavern/config:/home/node/app/config"
"/DockerData/configs/sillytavern/data:/home/node/app/data"
];
ports = [
"8000:8000"
];
labels = {
"io.containers.autoupdate" = "registry";
};
environment = {
"TZ" = "America/New_York";
};
log-driver = "journald";
};
systemd = {
services = {
"podman-sillytavern" = {
serviceConfig = {
Restart = lib.mkOverride 90 "always";
};
partOf = [ "podman-compose-sillytavern-root.target" ];
wantedBy = [ "podman-compose-sillytavern-root.target" ];
};
};
targets = {
"podman-compose-sillytavern-root" = {
wantedBy = [ "multi-user.target" ];
};
};
};
};
}