summaryrefslogtreecommitdiff
path: root/user-profiles/yt-dlp.nix
blob: a7f1ce3b65568a517ad3b5161078366c1c54bcf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ 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<=3840][height<=2160][fps<=60]+bestaudio"
        "best[width<=3840][height<=2160][fps<=60]"
        "best"
      ]}
      --sub-langs all,-live_chat
      --prefer-free-formats
      --embed-metadata
      --downloader ${pkgs.aria2}/bin/aria2c
    '';
  };
}