{ config, lib, pkgs, ... }: let domain = "etv.home.feal.no"; bind = "127.0.0.1:8409"; in { virtualisation.oci-containers.containers.ersatztv = { autoStart = true; image = "jasongdove/ersatztv:latest-nvidia"; volumes = [ "/var/lib/ersatztv:/root/.local/share/ersatztv" "/tank/media/other/ersatztv:/media" # Filler, watermarks, etc. ]; ports = [ "${bind}:8409" ]; environment = { TZ = "Europe/Oslo"; }; extraOptions = [ "--device=/dev/dri" ]; }; services.nginx.virtualHosts.${domain} = { locations."/".proxyPass = "http://${bind}"; }; }