{ config, lib, userName, pkgs, ... }: { home-manager.users.${userName} = { home.packages = with pkgs; [ yt-dlp ]; xdg.configFile."yt-dlp/config".text = '' --netrc --mark-watched --format ${lib.concatStringsSep "/" [ "bestvideo[width<=1920][height<=1080][fps<=60][protocol!=http_dash_segments]+bestaudio[protocol!=http_dash_segments]" "best[width<=1920][height<=1080][fps<=60][protocol!=http_dash_segments]" # "bestvideo[width<=2560][height<=1440][fps<=60][protocol!=http_dash_segments]+bestaudio[protocol!=http_dash_segments]" # "best[width<=2560][height<=1440][fps<=60][protocol!=http_dash_segments]" "best[protocol!=http_dash_segments]" ]} ''; }; }