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