summaryrefslogtreecommitdiff
path: root/user-profiles/yt-dlp.nix
blob: 1a30ab5acbd561c8f3a19f0bc8d5ab5c6b629135 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ config, lib, userName, pkgs, ... }:
{
  home-manager.users.${userName} = {
    programs.yt-dlp = {
      enable = true;
      settings = {
        cookies-from-browser = "firefox";
        mark-watched = true;
        format = lib.concatStringsSep "/" [
          "bestvideo[width<=3840][height<=2160][fps<=60]+bestaudio"
          "best[width<=3840][height<=2160][fps<=60]"
          "best"
        ];
        sub-langs = "all,-live_chat,-rechat";
        prefer-free-formats = true;
        embed-metadata = true;
        downloader = "${pkgs.aria2}/bin/aria2c";
        sponsorblock-mark = "all";
        restrict-filenames = true;
      };
    };
  };
}