diff --git a/hosts/sakura/hardware.nix b/hosts/sakura/hardware.nix index 847c9d1..18361cd 100644 --- a/hosts/sakura/hardware.nix +++ b/hosts/sakura/hardware.nix @@ -35,6 +35,10 @@ device = "192.168.1.199:/mnt/Sutoreji/nix-restic-data/sakura"; fsType = "nfs"; }; + "/nas/vods" = { + device = "192.168.1.199:/mnt/Sutoreji/vods"; + fsType = "nfs"; + }; }; swapDevices = [ diff --git a/hosts/sakura/services/default.nix b/hosts/sakura/services/default.nix index 2ead67e..8405898 100644 --- a/hosts/sakura/services/default.nix +++ b/hosts/sakura/services/default.nix @@ -10,5 +10,6 @@ ./tailscale.nix ./rustlog.nix ./wastebin.nix + ./ganymede.nix ]; } diff --git a/hosts/sakura/services/ganymede.nix b/hosts/sakura/services/ganymede.nix new file mode 100644 index 0000000..9cb4a12 --- /dev/null +++ b/hosts/sakura/services/ganymede.nix @@ -0,0 +1,32 @@ +_: { + networking.firewall.allowedTCPPorts = [4800]; + + sops.secrets.ganymede-auth = {}; + virtualisation.oci-containers.containers = { + ganymede = { + hostname = "ganymede"; + image = "ghcr.io/zibbp/ganymede@sha256:3f7a93e4875b665cd6473cea99f35fc790facd1f6cfed7c3e6c34c65a405727f"; # 4.0.3 + ports = ["4800:4800"]; + environment = { + VIDEOS_DIR = "/data/videos"; + TEMP_DIR = "/data/temp"; + TZ = "America/New_York"; + MAX_CHAT_DOWNLOAD_EXECUTIONS = "3"; + MAX_CHAT_RENDER_EXECUTIONS = "2"; + MAX_VIDEO_DOWNLOAD_EXECUTIONS = "2"; + MAX_VIDEO_CONVERT_EXECUTIONS = "3"; + MAX_VIDEO_SPRITE_THUMBNAIL_EXECUTIONS = "2"; + }; + environmentFiles = [ + /run/secrets/ganymede-auth # stores db creds && twitch creds + ]; + volumes = [ + "/nas/vods:/data/videos" + "/nas/vods/docker/ganymede:/data/temp" + "/nas/vods/docker/ganymede/logs:/data/logs" + "/nas/vods/docker/ganymede/config:/data/config" + ]; + extraOptions = ["--network=host"]; + }; + }; +}