summaryrefslogtreecommitdiff
path: root/user-profiles/yt-dlp.nix
blob: 946fd8d0a887bc1a135739ab2e2da4255ee767e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{ 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]"
      ]}
    '';
  };
}