{ lib, config, proxyReverse, ... }: let port = 8881; in { options.my.servers.metube.enable = lib.mkEnableOption "enable"; config = lib.mkIf config.my.servers.metube.enable { virtualisation.oci-containers.containers.metube = { image = "ghcr.io/alexta69/metube"; ports = [ "${toString port}:8081" ]; volumes = [ "${config.my.containerData}/metube:/downloads" "/home/jawz/.local/share/cookies.txt:/cookies.txt" ]; environment = { TZ = "America/Mexico_City"; YTDL_OPTIONS = ''{"cookiefile":"/cookies.txt"}''; }; }; services.nginx = { enable = true; virtualHosts."bajameesta.${config.my.domain}" = proxyReverse port // { }; }; }; }