{ config, lib, userName, pkgs, ... }: { home-manager.users.${userName} = { programs.yt-dlp = { enable = true; settings = { cookies-from-browser = "firefox"; mark-watched = true; format = lib.concatStringsSep "/" [ "bestvideo[width<=3840][height<=2160][fps<=60]+bestaudio" "best[width<=3840][height<=2160][fps<=60]" "best" ]; sub-langs = "all,-live_chat,-rechat"; prefer-free-formats = true; embed-metadata = true; # downloader = "${pkgs.axel}/bin/axel"; concurrent-fragments = 4; buffer-size = "16K"; sponsorblock-mark = "all"; restrict-filenames = true; extractor-args = lib.concatStringsSep ";" [ "youtube:player-client=android,web" "youtube:formats=dashy" ]; }; }; }; }