summaryrefslogtreecommitdiff
path: root/user-profiles/yt-dlp.nix
blob: dcba7fe2c4b4d3edb95a1d1bce92b4a2408068e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ 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
      --sponsorblock-mark all
    '';
  };
}