From dce843e98018baffd6a7d2d157d3362d1395fb0f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 4 Apr 2023 10:23:25 +0200 Subject: ... --- user-profiles/yt-dlp.nix | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'user-profiles/yt-dlp.nix') diff --git a/user-profiles/yt-dlp.nix b/user-profiles/yt-dlp.nix index 0af42786..1a30ab5a 100644 --- a/user-profiles/yt-dlp.nix +++ b/user-profiles/yt-dlp.nix @@ -1,21 +1,23 @@ { 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 - ''; + 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; + }; + }; }; } -- cgit v1.2.3