summaryrefslogtreecommitdiff
path: root/user-profiles/yt-dlp.nix
blob: c73787168a0202ce8e4460b5fa57085c962b2fdb (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 = ''
      --cookies-from-browser firefox
      --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
    '';
  };
}