{ lib, config, ... }: let setup = import ../factories/mkserver.nix { inherit lib config; }; cfg = config.my.servers.metube; in { options.my.servers.metube = setup.mkOptions "metube" "bajameesta" 8881; config.virtualisation.oci-containers.containers.metube = lib.mkIf cfg.enable { image = "ghcr.io/alexta69/metube:latest"; ports = [ "${toString cfg.port}:8081" ]; volumes = [ "${config.my.containerData}/metube:/downloads" "/home/jawz/.librewolf/cookies.txt:/cookies.txt" ]; environment = { TZ = config.my.timeZone; YTDL_OPTIONS = ''{"cookiefile":"/cookies.txt"}''; PUID = toString config.users.users.jawz.uid; PGID = toString config.users.groups.piracy.gid; }; }; }